genasm.exe fails - by asdadrsdfdsdsfds

Status : 


Sign in
to vote
ID 339763 Comments
Status Active Workarounds
Type Bug Repros 1
Opened 4/24/2008 12:42:04 AM
Access Restriction Public


I am developing a component for Windows Mobile 5 that contains a public property of SqlCeConnection Type. Also, I have a DesignTimeAttributes that contains a ToolboxBitmapAttribute. When I try to generate my Assembly, I get the following error: "Error 1 genasm.exe(1) : error There was an error initializing BD._ComponenteBD.get_Cnn.  No se puede cargar el archivo o ensamblado 'System.Data, Version=, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes' ni una de sus dependencias. El sistema no puede hallar el archivo especificado.	ComponenteBD
How ever, if I comment the line where SqlCeConnection is, the error does not occur.
Sign in to post a comment.
Posted by JFJBHIFI on 3/30/2011 at 11:11 PM
So this is allegedly fixed in Visual Studio 2010? How useful, especially since the Compact Framework was DROPPED from this product!

Can we get a hotfix?
Posted by Philippe_0183 on 6/27/2008 at 4:33 AM
found a work around:

-set in comment the part of the projet which generates the error, for example the datasets objects etc...

-build the projet in order to create the myproject.asmmeta.dll file

-unset the comments

-set the value"content" to the generation action property of the file designtimeattributes.xmta
Posted by Microsoft on 5/28/2008 at 12:54 AM
Hi elGarry,

We have looked into this issue and decided to take up the fix for the next version of Visual Studio (VS 10). We came to this decision mainly considering the high risk the fix introduces to the product and the fact that there is a resonably simple workaround.

As you might have guessed, the issue exists because the project system fails to send references to System.Data v2.0 and its dependencies (System v2.0) to genasm.

So as a work around you can do this:
1. In C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.Common.targets, change line 75 as follows
<!             ReferencePath="@(ReferencePath)"
!>             ReferencePath="@(ReferencePath);@(AdditionalGenAsmReferences)"
2. For every project that show simillar issues, determine the assembly that genasm is failing to find from the build error message (e.g. in this case it is System.Data.dll v2.0) and all its dependencies using ildasm (e.g. dependencies of System.Data v2.0 is System.dll v2.0)
3. Locate then on your disk (e.g. System.Data and System.dll v2.0 are located at $(ProgramFiles)\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE.
4. Manually edit your project (right click on project node in solution explorer, unload project, right click on unloaded project node, edit project)
5. Add the following anywhere before the "<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />" or "<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.VisualBasic.targets" />" lines:
    <Reference Include="$(ProgramFiles)\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\System.dll" />
    <Reference Include="$(ProgramFiles)\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\System.Data.dll" />
6. Reload your project and build.

Let me know if you need any additional help. I can be reached at p a r t h a d @ m i c r o s o f t . c o m.

I apologize for this issue and thanks for taking time out to report it,

Partho P. Das,
Developer, Visual Studio for Devices
Posted by Microsoft on 4/28/2008 at 1:07 AM
Thanks for your feedback.

We are escalating this issue to the appropriate group within the Visual Studio Product Team for triage and resolution.
These specialized experts will follow-up with your issue.

Thank you,
Visual Studio Product Team
Posted by Microsoft on 4/24/2008 at 11:30 PM
Thanks for reporting the issue.
In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

It may help if you provide us with:
a) a zipped project file
b) more steps/actions to reproduce the problem

If we do not receive a response from you after 7-days , we will automatically close your issue. There is no obligation to respond -- at any time you may edit your issue via Connect and change the status to “Active.”

Thank you,
Visual Studio Product Team