Click here to Skip to main content
15,891,431 members
Home / Discussions / C#
   

C#

 
GeneralRe: Pin
Johan Glysing8-Sep-05 19:04
Johan Glysing8-Sep-05 19:04 
GeneralRe: Pin
Stefan Troschuetz8-Sep-05 20:26
Stefan Troschuetz8-Sep-05 20:26 
GeneralRe: Pin
Anonymous9-Sep-05 3:32
Anonymous9-Sep-05 3:32 
GeneralRe: Pin
Stefan Troschuetz9-Sep-05 3:44
Stefan Troschuetz9-Sep-05 3:44 
QuestionHELP: expose windows form from windows service Pin
SongDog8-Sep-05 3:49
SongDog8-Sep-05 3:49 
AnswerRe: HELP: expose windows form from windows service Pin
Dave Kreskowiak8-Sep-05 6:46
mveDave Kreskowiak8-Sep-05 6:46 
QuestionComposite Key Constraint logic Pin
Anonymous8-Sep-05 3:49
Anonymous8-Sep-05 3:49 
QuestionOpenFileDialog bug?? Pin
john_mcp8-Sep-05 3:31
john_mcp8-Sep-05 3:31 
AnswerRe: OpenFileDialog bug?? Pin
Dave Kreskowiak8-Sep-05 6:43
mveDave Kreskowiak8-Sep-05 6:43 
Questiongot lParam, what to do now? Pin
Lapje8-Sep-05 3:10
Lapje8-Sep-05 3:10 
AnswerRe: got lParam, what to do now? Pin
John Fisher8-Sep-05 7:45
John Fisher8-Sep-05 7:45 
AnswerRe: got lParam, what to do now? Pin
Alex Korchemniy8-Sep-05 10:09
Alex Korchemniy8-Sep-05 10:09 
GeneralRe: got lParam, what to do now? Pin
Lapje9-Sep-05 6:36
Lapje9-Sep-05 6:36 
QuestionBitmap to byte array? Pin
Dr Herbie8-Sep-05 2:46
Dr Herbie8-Sep-05 2:46 
AnswerRe: Bitmap to byte array? Pin
Charlie Williams8-Sep-05 4:32
Charlie Williams8-Sep-05 4:32 
AnswerRe: Bitmap to byte array? Pin
thomasa8-Sep-05 4:39
thomasa8-Sep-05 4:39 
GeneralRe: Bitmap to byte array? Pin
Judah Gabriel Himango8-Sep-05 6:55
sponsorJudah Gabriel Himango8-Sep-05 6:55 
GeneralRe: Bitmap to byte array? Pin
thomasa8-Sep-05 21:34
thomasa8-Sep-05 21:34 
GeneralRe: Bitmap to byte array? Pin
Judah Gabriel Himango9-Sep-05 4:24
sponsorJudah Gabriel Himango9-Sep-05 4:24 
QuestionCryptographicException when instantiating RSACryptoServiceProvider Pin
mav.northwind8-Sep-05 2:35
mav.northwind8-Sep-05 2:35 
AnswerRe: CryptographicException when instantiating RSACryptoServiceProvider Pin
Ashok Dhamija8-Sep-05 4:00
Ashok Dhamija8-Sep-05 4:00 
GeneralRe: CryptographicException when instantiating RSACryptoServiceProvider Pin
mav.northwind8-Sep-05 5:01
mav.northwind8-Sep-05 5:01 
GeneralRe: CryptographicException when instantiating RSACryptoServiceProvider Pin
Ashok Dhamija8-Sep-05 18:36
Ashok Dhamija8-Sep-05 18:36 
AnswerRe: CryptographicException when instantiating RSACryptoServiceProvider Pin
mav.northwind8-Sep-05 20:28
mav.northwind8-Sep-05 20:28 
QuestionUsing Resources - Command Line Compile vs VS Compile Pin
MrEyes8-Sep-05 2:15
MrEyes8-Sep-05 2:15 
Hello all,

I am currently trying to convert a batch (CSC) compiled project into a VS 2003 solution, and I seem to be having a small problem with embedded resources.

This particular project uses the following batch arguments to compile (which works fine btw)

@echo off
if not exist lib   md lib
if not exist doc   md doc

if exist lib\Novell.Directory.Ldap.dll del lib\Novell.Directory.Ldap.dll

echo "Building resources..."
resgen Novell.Directory.Ldap\Novell.Directory.Ldap.UtilClass\ResultCodeMessages.txt lib\ResultCodeMessages.resources

resgen Novell.Directory.Ldap\Novell.Directory.Ldap.UtilClass\ExceptionMessages.txt lib\ExceptionMessages.resources

echo "Generating lib\Novell.Directory.Ldap.dll.."
csc /noconfig /w:1 /r:System.dll /target:library /resource:lib\ResultCodeMessages.resources
-> /resource:lib\ExceptionMessages.resources /doc:doc\comments.xml 
-> /out:lib\Novell.Directory.Ldap.dll  /recurse:Novell.Directory.Ldap\*.cs

del lib\ResultCodeMessages.resources
del lib\ExceptionMessages.resources


The problem I have is with the two resources generated above using the resgen tool. In my VS solution I have set both these files to be "embedded resources" but I get the following exception

{"Could not find any resources appropriate for the specified culture (or the neutral culture)
in the given assembly.  Make sure \"ResultCodeMessages.resources\" was correctly embedded or
linked into assembly \"LibLdap\".\r\nbaseName: ResultCodeMessages  locationInfo: <null>
resource file name: ResultCodeMessages.resources  assembly: LibLdap, Version=2.1.3.0,
culture=neutral, PublicKeyToken=null" }


When the following code is executed:

defaultResultCodes = new ResourceManager("ResultCodeMessages", Assembly.GetExecutingAssembly());
result = defaultResultCodes.GetString(Convert.ToString(code), defaultLocale);


A similar exception occurs when attempting to access the other resource.

I know this is simply that the code cannot find the resource, can anybody tell me how to embed it correctly?

post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42

-- modified at 8:19 Thursday 8th September, 2005

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.