Managed C# Compiler question
-
I am trying to get an assembly compiled using the managed compiler and get the resulting class library strong named. First I tried an explicite path to the file in the assembly. No go. :(( Now: the assembly info states that the strong name key must be relative to the project location....so I created the location in the assembly file as ..\..\keyfilename.snk and tried to have it find it. I first tried just locating the strong name key file within the source files and then in the bin file and in both cases the key file is reported as not found by the compiler. So next I added the path to my source in the /lib: switch for the compiler. This still ended with file not found. :(( Has :rose: anyone :rose: gotten a strong named compilation using the managed compiler and how did you get it to find the snk file ??? :confused::confused::confused: I am at wits end. :eek: Thanks, MJ _____________________________________________ The world is a dangerous place.
Not because of those that do evil,
but because of those who look on and do nothing. -
I am trying to get an assembly compiled using the managed compiler and get the resulting class library strong named. First I tried an explicite path to the file in the assembly. No go. :(( Now: the assembly info states that the strong name key must be relative to the project location....so I created the location in the assembly file as ..\..\keyfilename.snk and tried to have it find it. I first tried just locating the strong name key file within the source files and then in the bin file and in both cases the key file is reported as not found by the compiler. So next I added the path to my source in the /lib: switch for the compiler. This still ended with file not found. :(( Has :rose: anyone :rose: gotten a strong named compilation using the managed compiler and how did you get it to find the snk file ??? :confused::confused::confused: I am at wits end. :eek: Thanks, MJ _____________________________________________ The world is a dangerous place.
Not because of those that do evil,
but because of those who look on and do nothing.theRealCondor wrote: ..\..\keyfilename.snk AssemblyKeyFile("..\\..\\mykey.snk") Is it that simple a problem?
-
I am trying to get an assembly compiled using the managed compiler and get the resulting class library strong named. First I tried an explicite path to the file in the assembly. No go. :(( Now: the assembly info states that the strong name key must be relative to the project location....so I created the location in the assembly file as ..\..\keyfilename.snk and tried to have it find it. I first tried just locating the strong name key file within the source files and then in the bin file and in both cases the key file is reported as not found by the compiler. So next I added the path to my source in the /lib: switch for the compiler. This still ended with file not found. :(( Has :rose: anyone :rose: gotten a strong named compilation using the managed compiler and how did you get it to find the snk file ??? :confused::confused::confused: I am at wits end. :eek: Thanks, MJ _____________________________________________ The world is a dangerous place.
Not because of those that do evil,
but because of those who look on and do nothing. -
Just put every thing in the same directory and change the assembly.cs file to point to the current directory. :) I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
lippie, I had put the snKey file, and source files in one directory, and set [assembly:AssemblyKeyFile("")] to the same directory name. RESULT: key file could not be found I had put the snKey file and source files in one directory and set [assembly:AssemblyKeyFile("..\\..\\keyfile.snk")] RESULT: key file could not be found I had put the snKey file in the build directory and set the [assembly:AssemblyKeyFile("..\\..\\\\keyfile.snk")] RESULT: key file could not be found I had put the snKey file in the build directory and directly pointed at the build directory RESULT: key file could not be found I added a compile parameter /lib:"my souce library path" RESULT: key file could not be found I am about to put a shotgun in the mouth of the compiler and let it try and find it's brains after I pull the trigger !!!!! I suspect that the little tidbit in AssemblyInfo where it goes after %Project Directory%\obj\ that I am either a) not getting %Project Directory% set or b) I am still missing a directive to the compiler (which still goes back to a). _____________________________________________ The world is a dangerous place.
Not because of those that do evil,
but because of those who look on and do nothing. -
theRealCondor wrote: ..\..\keyfilename.snk AssemblyKeyFile("..\\..\\mykey.snk") Is it that simple a problem?
Robert, I was shothanding here. if ..\.. was actually entered into the assemblyinfo file, it would fail with a compile error and never attempt to compile the dll since \. is an invalid control character. _____________________________________________ The world is a dangerous place.
Not because of those that do evil,
but because of those who look on and do nothing. -
Just put every thing in the same directory and change the assembly.cs file to point to the current directory. :) I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
I finally got the managed compiler to create a strong named assembly. What I had to do was as follows: 1) I did a File.Copy to move the SN Key from the selected directory to the source directory. This was my choice but not necessary. 2) Instead of setting [AssemblyKeyName...] I had to set [AssemblyKeyFile... and specified the fully qualified path. [AssemblyKeyFile="D:\myApp\mySource\keyF.snk"] 3) Compile to your hearts content!!!! WOOHOO! _____________________________________________ The world is a dangerous place.
Not because of those that do evil,
but because of those who look on and do nothing.