question

Sergio-9977 avatar image
0 Votes"
Sergio-9977 asked JackJJun-MSFT commented

Could not find the resource 2

I have already asked this question, see link:
https://docs.microsoft.com/en-us/answers/questions/545293/could-not-find-the-resource.html?childToView=545634#answer-545634

The answer I received did not correspond to the question asked.
Anyone know how to fix this?
Thank you

dotnet-csharp
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JackJJun-MSFT avatar image
1 Vote"
JackJJun-MSFT answered JackJJun-MSFT commented

@Sergio-9977, based on my test, I can run the exe successfully in the final. Therefore, I recommend that you check the following steps if the same as you or not.

First, Please check if your en-us folder has the Example.resources.dll and fr-FR folder has the Example.resources.dll.

Second, Please ensure that your en-us folder and fr-FR folder is in the same directory as the resources files and the txt files.

Third, We need to create the Example.cs manually(We could create a Example.txt file then change the extension to .cs) and copy all the code from the doc to Example.cs.(Example.cs is also in the same directory with resource files)

Finally, Please check if you used the following command to generate a exe.

 csc Example.cs /resource:ExampleResources.resources  







· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Perfect!
it works. My mistake was compiling Example.cs with Visual Studio.
Thanks
How do I mark the answer as valid?

0 Votes 0 ·

@Sergio-9977 , I have convert the comment to an answer, You can do it.

1 Vote 1 ·