aewarnick Posted March 8, 2003 Posted March 8, 2003 I need help to compile a dll file for my class- Andrew. Help is not much help in VS. It says to type csc /target:library /out:ProgramAW.dll Andrew.cs but Here is the error message I get when I press enter: Quote C#
aewarnick Posted March 8, 2003 Author Posted March 8, 2003 Here is another one where I put / before csc: Quote C#
*Gurus* Derek Stone Posted March 8, 2003 *Gurus* Posted March 8, 2003 You need to add the .NET Framework directory to the global PATH variable in Windows. Either that, or be forced into typing out the full path to csc.exe all the time. Right click on My Computer and select Properties. Click the Advanced tab and hit the Environment Variables button. Append the location of the .NET Framework folder to the end of the PATH variable (either will do). Make sure to delimit it with a semicolon. The .NET framework path should look like the following: C:\%WINDOWSDIR%\Microsoft.NET\Framework\v1.0.3705 Quote Posting Guidelines
aewarnick Posted March 9, 2003 Author Posted March 9, 2003 (edited) Here is what is in the system variables path section: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem; C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705 I put the last one in but I am still having the same problem. I guess I don't understand the concept of what I am doing. I also tried putting this: "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\csc.exe" /target:library /out:ProgramAW.dll Andrew.cs in the command window but that does not work either. What could I be doing wrong? I have looked in help for hours now and have not found really any help at all! Edited March 9, 2003 by aewarnick Quote C#
*Gurus* divil Posted March 9, 2003 *Gurus* Posted March 9, 2003 It looks like you're trying to use the command window in VS. You should be using the Windows command line. Open it by going to start, run and typing cmd. Then you have to navigate to your code directory and run the csc command, providing you've added the directories to your path as Derek said. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
aewarnick Posted March 9, 2003 Author Posted March 9, 2003 Ok, that worked. But now how do I make a reference (using) to my dll when it is in the framework version folder with all the other libraries? The compiler or VS does not find it. Quote C#
aewarnick Posted March 9, 2003 Author Posted March 9, 2003 I got it working but I had to set the copy local property to true. I don't think I should have to do that. I saved it as ProgramAW.dll and the namespace is ProgramAW class Andrew. If I have copy local set to false I have to write ProgramAW.Andrew all throughout my code and I cannot do that. Is there any way to fix this? Quote C#
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.