Reputation: 193
I am having a msbuild error with dotNet framework 4.0. I can build locally in VS2012 without any errors but when I push the code to the build server it fails with the following error:
error CS0012: The type 'CS.Framework.Services.IRequest' is defined in an assembly that is not referenced. You must add a reference to assembly 'CS.Framework.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0decfeffa518e9a9'.
Here is the logging from msbuild and you can see the project in question is listed:
<task name="msbuild">
<message level="Info"><![CDATA[CS.Framework.Enums -> e:\CCNet\SVNCheckouts\]></message>
<message level="Info"><![CDATA[CS.Framework.Extensions -> e:\CCNet\SVNCheckouts\]></message>
<message level="Info"><![CDATA[CS.Entities.Common -> e:\CCNet\SVNCheckouts\]></message>
<message level="Info"><![CDATA[CS.Framework.Common -> e:\CCNet\SVNCheckouts\]></message>
<message level="Info"><![CDATA[CS.Framework.Services -> e:\CCNet\SVNCheckouts\]></message>
<message level="Info"><![CDATA[CS.DataContracts.Services.Core -> e:\CCNet\SVNCheckouts\]]></message>
<message level="Info"><![CDATA[CS.DataContracts.NetSuiteService -> e:\CCNet\SVNCheckouts\]></message>
<message level="Info"><![CDATA[CS.ServiceContracts.NetSuiteService -> e:\CCNet\SVNCheckouts\]></message>
<message level="Info"><![CDATA[CS.DataContracts.Authorization -> e:\CCNet\SVNCheckouts\]></message>
<message level="Info"><![CDATA[CS.ServiceContracts.Authorization -> e:\CCNet\SVNCheckouts\]]></message>
<message level="Info"><![CDATA[CS.Entities.Services.Core -> e:\CCNet\SVNCheckouts\]]></message>
<message level="Info"><![CDATA[CS.Framework.Caching -> e:\CCNet\SVNCheckouts\]]></message>
<message level="Info"><![CDATA[CS.Framework.Wcf -> e:\CCNet\SVNCheckouts\]]></message>
<message level="Info"><![CDATA[CS.Framework.Services.Core -> e:\CCNet\SVNCheckouts\]]></message>
<message level="Info"><![CDATA[CS.Services.NetSuiteService -> e:\CCNet\SVNCheckouts\]]></message>
<message level="Info"><![CDATA[c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3245: Could not resolve this reference. Could not locate the assembly "CS.Framework.Services". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. ]]></message>
<message level="Info"><![CDATA[ServiceTests.cs(41,13): error CS0012: The type 'CS.Framework.Services.IRequest' is defined in an assembly that is not referenced. You must add a reference to assembly 'CS.Framework.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0decfeffa518e9a9'. ]]></message>
<duration>1000.0256</duration>
</task>
The project has a reference to CS.Framework.Services project so not sure why it says its not there.
Upvotes: 0
Views: 1576
Reputation: 193
I ended up removing and re-adding the reference and that seemed to resolve the issue.
Upvotes: 0
Reputation: 77304
It's right there:
warning MSB3245: Could not resolve this reference.
Could not locate the assembly "CS.Framework.Services".
Check to make sure the assembly exists on disk.
Locally you have the assembly on disk, but if you get it from SVN, this assembly is not there. You need to make sure your build server has access to this assembly.
Upvotes: 3