If a Visual Studio solution contains a project that uses LINQ to SQL classes (.dbml), the Windows installer project will fail to build.
Here is an example.
The following illustrates the solution, project, and file structure.
Solution1.sln
|- ClassLibrary1.csproj
|- DataClasses.dbml
|- Setup1.vdproj
|- Primary output from ClassLibrary1
When building this solution, I always get the following message:
========== Build: 1 succeeded or up-to-date, 1 failed, 0 skipped ==========
If I check the setup project output path, the setup.msi is generated there. And running the installer successfully deploys the classlibrary1.dll.
Here comes the surprising work around.
open the ClassLibrary1.csproj in the editor (Unload Project | Edit ClassLibrary1.csproj)
remove (or comment out) the following node
<ItemGroup>
<Service Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}" />
</ItemGroup>
reload project
restart the IDE
build solution
========== Build: 2 succeeded or up-to-date, 0 failed, 0 skipped ==========
So what is this ItemGroup/Service/@Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}"?
Googling this GUID did not come up any useful info
However, the Windows registry editor helped to locate this under HKLM/SOFTWARE/Microsoft/VisualStudio/9.0/Services. It looks related to the O/R data class designer. This is very strange that it affects Visual Studio when building the setup (.vdproj).
Anyway, after removing (or commenting out) the node from the class library project (.csproj), I can build the whole solution again. And I have not seen any impact either on working with the LINQ to SQL data classes.
Print | posted on Saturday, April 05, 2008 9:08 PM