Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

reference problems with legacy project
rafael-miceli
#1 Posted : Wednesday, July 9, 2014 8:29:33 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/7/2014(UTC)
Posts: 3
Location: Brazil

Hi NCrunch Team.

I work with a some legacy projects and I'm covering them with unit tests.

the solution already build ok, but NCrunch always give this error:

RegrasPrimeWS.asmx.cs (12): The type or namespace name 'RegrasPrimeBusiness' could not be found (are you missing a using directive or an assembly reference?

And this warning:

The primary reference "C:\Users\rafael.miceli\AppData\Local\NCrunch\9500\14\_ncrunchreferences\RegrasPrimeBusiness.dll" could not be resolved because it has an indirect dependency on the .NET Framework assembly "WindowsBase, Version=3.0.51116.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which has a higher version "3.0.51116.0" than the version "3.0.0.0" in the current target framework.



The actual solution is composed by two class library, one WebService, and one TestProject

NCrumnch Fails to build the WebSercie wich reference one class library.

The difference I noted in the .proj from Vs to NCrunch is that the refence to the class library have the tag <SpecificVersion>true</SpecificVersion>.
And in NCrunch .proj does not.

Here is the .proj file from VS:

Code:
[quote]<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="(- BROKEN LINK -)" ToolsVersion="12.0">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{E90C830E-08C8-446D-8074-00309B26F40D}</ProjectGuid>
    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>WSRegrasServicePrime</RootNamespace>
    <AssemblyName>WSRegrasServicePrime</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <UpgradeBackupLocation>
    </UpgradeBackupLocation>
    <OldToolsVersion>2.0</OldToolsVersion>
    <TargetFrameworkProfile />
    <UseIISExpress>false</UseIISExpress>
    <IISExpressSSLPort />
    <IISExpressAnonymousAuthentication />
    <IISExpressWindowsAuthentication />
    <IISExpressUseClassicPipelineMode />
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="RegrasPrimeBusiness, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <HintPath>..\bin\RegrasPrimeBusiness.dll</HintPath>
	  <SpecificVersion>True</SpecificVersion>
      <Private>False</Private>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Web" />
    <Reference Include="System.Web.DynamicData" />
    <Reference Include="System.Web.Entity" />
    <Reference Include="System.Web.Extensions" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Configuration" />
    <Reference Include="System.Web.Services" />
    <Reference Include="System.EnterpriseServices" />
    <Reference Include="System.Web.Mobile" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="UltEik, Version=8.0.0.0, Culture=neutral, PublicKeyToken=8dab84876b1af50a, processorArchitecture=MSIL">
      <SpecificVersion>True</SpecificVersion>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Content Include="RegrasPrimeWS.asmx" />
    <None Include="Properties\PublishProfiles\LocalSystem.pubxml" />
    <None Include="Web References\ClientServiceWS\Service.disco" />
    <None Include="Web References\DBConnection\WSSearchValuesCatalogs.disco" />
    <Content Include="Substituto_PrimeWS.asmx" />
    <Content Include="Web.config" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Data\Context.cs" />
    <Compile Include="Model\BuscarGrupo.cs" />
    <Compile Include="Model\BuscarSLA.cs" />
    <Compile Include="Model\BuscarSubstituto.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Properties\Settings.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
      <DependentUpon>Settings.settings</DependentUpon>
    </Compile>
    <Compile Include="RegrasPrimeWS.asmx.cs">
      <DependentUpon>RegrasPrimeWS.asmx</DependentUpon>
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="Substituto_PrimeWS.asmx.cs">
      <DependentUpon>Substituto_PrimeWS.asmx</DependentUpon>
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="Web References\ClientServiceWS\Reference.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Reference.map</DependentUpon>
    </Compile>
    <Compile Include="Web References\DBConnection\Reference.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Reference.map</DependentUpon>
    </Compile>
    <Compile Include="WSRegrasServicePrimeException.cs" />
  </ItemGroup>
  <ItemGroup>
    <WebReferences Include="Web References\" />
  </ItemGroup>
  <ItemGroup>
    <WebReferenceUrl Include="(- BROKEN LINK -)">
      <UrlBehavior>Dynamic</UrlBehavior>
      <RelPath>Web References\DBConnection\</RelPath>
      <UpdateFromURL>(- BROKEN LINK -)</UpdateFromURL>
      <ServiceLocationURL>
      </ServiceLocationURL>
      <CachedDynamicPropName>
      </CachedDynamicPropName>
      <CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
      <CachedSettingsPropName>WSRegrasServicePrime_DBConnection_WSSearchValuesCatalogs</CachedSettingsPropName>
    </WebReferenceUrl>
    <WebReferenceUrl Include="(- BROKEN LINK -)">
      <UrlBehavior>Dynamic</UrlBehavior>
      <RelPath>Web References\ClientServiceWS\</RelPath>
      <UpdateFromURL>(- BROKEN LINK -)</UpdateFromURL>
      <ServiceLocationURL>
      </ServiceLocationURL>
      <CachedDynamicPropName>
      </CachedDynamicPropName>
      <CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
      <CachedSettingsPropName>WSRegrasServicePrime_ClientServiceWS_Services</CachedSettingsPropName>
    </WebReferenceUrl>
  </ItemGroup>
  <ItemGroup>
    <Content Include="exceptionhandling.config" />
    <Content Include="logging.config" />
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    </None>
    <None Include="Web References\ClientServiceWS\ForwardedTask.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\GroupInfo.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\IncidentMemo.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\IncidentStatus.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\InstalledProcess.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\Reference.map">
      <Generator>MSDiscoCodeGenerator</Generator>
      <LastGenOutput>Reference.cs</LastGenOutput>
    </None>
    <None Include="Web References\ClientServiceWS\SchemaFile.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\Service.wsdl" />
    <None Include="Web References\ClientServiceWS\UserAssociate.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\UserProperties.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\UserServerPreference.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\UserSubordinate.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\View.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\ViewFolder.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\DBConnection\Reference.map">
      <Generator>MSDiscoCodeGenerator</Generator>
      <LastGenOutput>Reference.cs</LastGenOutput>
    </None>
    <None Include="Web References\DBConnection\WSSearchValuesCatalogs.wsdl" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\..\ExLogManager\ExLogManager.csproj">
      <Project>{45DF195D-E32B-48EB-BE51-EE79AE24AF46}</Project>
      <Name>ExLogManager</Name>
    </ProjectReference>
  </ItemGroup>
  <PropertyGroup>
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
  </PropertyGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <UseIIS>False</UseIIS>
          <AutoAssignPort>True</AutoAssignPort>
          <DevelopmentServerPort>3009</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>
          </IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>False</UseCustomServer>
          <CustomServerUrl>
          </CustomServerUrl>
          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
</Project>[/quote]



And here's the generated from NCrunch build:

Code:
[quote]<?xml version="1.0" encoding="utf-16"?>
<Project DefaultTargets="Build;NCrunchOutputDataQuery" xmlns="(- BROKEN LINK -)" ToolsVersion="12.0">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{E90C830E-08C8-446D-8074-00309B26F40D}</ProjectGuid>
    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>WSRegrasServicePrime</RootNamespace>
    <AssemblyName>WSRegrasServicePrime</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <UpgradeBackupLocation>
    </UpgradeBackupLocation>
    <OldToolsVersion>2.0</OldToolsVersion>
    <TargetFrameworkProfile />
    <UseIISExpress>false</UseIISExpress>
    <IISExpressSSLPort />
    <IISExpressAnonymousAuthentication />
    <IISExpressWindowsAuthentication />
    <IISExpressUseClassicPipelineMode />
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\</OutputPath>
    <DefineConstants>NCRUNCH;DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\</OutputPath>
    <DefineConstants>NCRUNCH;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="C:\Users\rafael.miceli\AppData\Local\NCrunch\9500\14\_ncrunchreferences\RegrasPrimeBusiness.dll">
      <Private>False</Private>
    </Reference>
    <Reference Include="C:\Users\rafael.miceli\AppData\Local\NCrunch\9500\6\ExLogManager\bin\Debug\ExLogManager.dll" />
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Web" />
    <Reference Include="System.Web.DynamicData" />
    <Reference Include="System.Web.Entity" />
    <Reference Include="System.Web.Extensions" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Configuration" />
    <Reference Include="System.Web.Services" />
    <Reference Include="System.EnterpriseServices" />
    <Reference Include="System.Web.Mobile" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="UltEik, Version=8.0.0.0, Culture=neutral, PublicKeyToken=8dab84876b1af50a, processorArchitecture=MSIL">
      <SpecificVersion>True</SpecificVersion>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Content Include="RegrasPrimeWS.asmx" />
    <None Include="Properties\PublishProfiles\LocalSystem.pubxml" />
    <None Include="Web References\ClientServiceWS\Service.disco" />
    <None Include="Web References\DBConnection\WSSearchValuesCatalogs.disco" />
    <Content Include="Substituto_PrimeWS.asmx" />
    <Content Include="Web.config" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Data\Context.cs" />
    <Compile Include="Model\BuscarGrupo.cs" />
    <Compile Include="Model\BuscarSLA.cs" />
    <Compile Include="Model\BuscarSubstituto.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Properties\Settings.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
      <DependentUpon>Settings.settings</DependentUpon>
    </Compile>
    <Compile Include="RegrasPrimeWS.asmx.cs">
      <DependentUpon>RegrasPrimeWS.asmx</DependentUpon>
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="Substituto_PrimeWS.asmx.cs">
      <DependentUpon>Substituto_PrimeWS.asmx</DependentUpon>
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="Web References\ClientServiceWS\Reference.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Reference.map</DependentUpon>
    </Compile>
    <Compile Include="Web References\DBConnection\Reference.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Reference.map</DependentUpon>
    </Compile>
    <Compile Include="WSRegrasServicePrimeException.cs" />
  </ItemGroup>
  <ItemGroup>
    <WebReferences Include="Web References\" />
  </ItemGroup>
  <ItemGroup>
    <WebReferenceUrl Include="(- BROKEN LINK -)">
      <UrlBehavior>Dynamic</UrlBehavior>
      <RelPath>Web References\DBConnection\</RelPath>
      <UpdateFromURL>(- BROKEN LINK -)</UpdateFromURL>
      <ServiceLocationURL>
      </ServiceLocationURL>
      <CachedDynamicPropName>
      </CachedDynamicPropName>
      <CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
      <CachedSettingsPropName>WSRegrasServicePrime_DBConnection_WSSearchValuesCatalogs</CachedSettingsPropName>
    </WebReferenceUrl>
    <WebReferenceUrl Include="(- BROKEN LINK -)">
      <UrlBehavior>Dynamic</UrlBehavior>
      <RelPath>Web References\ClientServiceWS\</RelPath>
      <UpdateFromURL>(- BROKEN LINK -)</UpdateFromURL>
      <ServiceLocationURL>
      </ServiceLocationURL>
      <CachedDynamicPropName>
      </CachedDynamicPropName>
      <CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
      <CachedSettingsPropName>WSRegrasServicePrime_ClientServiceWS_Services</CachedSettingsPropName>
    </WebReferenceUrl>
  </ItemGroup>
  <ItemGroup>
    <Content Include="exceptionhandling.config" />
    <Content Include="logging.config" />
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    </None>
    <None Include="Web References\ClientServiceWS\ForwardedTask.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\GroupInfo.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\IncidentMemo.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\IncidentStatus.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\InstalledProcess.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\Reference.map">
      <Generator>MSDiscoCodeGenerator</Generator>
      <LastGenOutput>Reference.cs</LastGenOutput>
    </None>
    <None Include="Web References\ClientServiceWS\SchemaFile.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\Service.wsdl" />
    <None Include="Web References\ClientServiceWS\UserAssociate.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\UserProperties.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\UserServerPreference.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\UserSubordinate.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\View.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\ClientServiceWS\ViewFolder.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </None>
    <None Include="Web References\DBConnection\Reference.map">
      <Generator>MSDiscoCodeGenerator</Generator>
      <LastGenOutput>Reference.cs</LastGenOutput>
    </None>
    <None Include="Web References\DBConnection\WSSearchValuesCatalogs.wsdl" />
  </ItemGroup>
  <PropertyGroup>
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
  </PropertyGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <UseIIS>False</UseIIS>
          <AutoAssignPort>True</AutoAssignPort>
          <DevelopmentServerPort>3009</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>
          </IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>False</UseCustomServer>
          <CustomServerUrl>
          </CustomServerUrl>
          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
  <Target Name="NCrunchOutputDataQuery" DependsOnTargets="">
    <Message Text="#Expression_8d9e4d479f18485a81a6750bcd027570=$(OutDir)$(TargetName)$(TargetExt)" />
    <Message Text="#$TargetFrameworkDirectory=;$(TargetFrameworkDirectory)" />
    <Message Text="#_SourceItemsToCopyToOutputDirectoryAlways=;@(_SourceItemsToCopyToOutputDirectoryAlways)" />
    <Message Text="#_SourceItemsToCopyToOutputDirectory=;@(_SourceItemsToCopyToOutputDirectory)" />
    <Message Text="#ReferencePath=;@(ReferencePath)" />
  </Target>
  <Target Name="_GenerateAppxPackageRecipe" DependsOnTargets="">
  </Target>
  <Target Name="NCrunchPrepareForBuild" DependsOnTargets="">
  </Target>
</Project>[/quote]



The difference Lies in:

Vs build:

<Reference Include="RegrasPrimeBusiness, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\bin\RegrasPrimeBusiness.dll</HintPath>
<SpecificVersion>True</SpecificVersion>
<Private>False</Private>
</Reference>

NCrunch build:

<Reference Include="C:\Users\rafael.miceli\AppData\Local\NCrunch\9500\14\_ncrunchreferences\RegrasPrimeBusiness.dll">
<Private>False</Private>
</Reference>


What can I do to make my projects build with NCrunch?

Thanks
Remco
#2 Posted : Wednesday, July 9, 2014 10:28:24 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi, thanks for sharing this issue and for posting your build XML. This really helps with analysing the problem.

I've verified that NCrunch isn't copying over the 'SpecificVersion' tag into the generated project file in the workspace. This is probably by design, as NCrunch already considers this tag when it identifies the reference being used by MSBuild. Likely it isn't specifying the tag inside the workspaced build because it shouldn't be needed in this context and may inhibit NCrunch from forcing MSBuild to use the correct reference in some situations.

I'm wondering if you could try the following?

1. Open up the generated .csproj file inside the workspace (as you have already done)
2. Add the 'SpecificVersion' tag as it exists in the foreground project file
3. Open a command prompt, and run MSBuild.exe against the generated .csproj file
4. Does the build pass successfully?

It is possible that you have multiple versions of the referenced DLL inside your solution? Or perhaps that there is a binding redirection for WindowsBase that may be failing?
rafael-miceli
#3 Posted : Thursday, July 10, 2014 4:39:55 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/7/2014(UTC)
Posts: 3
Location: Brazil

Hi Remco, Thanks the response.

I've done what you asked about Add the "SpecificVersion" tag and run the MSBuild against the project and builded successfully!

I also looked for multiple versions of the DLL iniside my solution, and did not find any other then the one I'm currently referencing. And also did not find a binding redirection fo WindowsBase.

So, it seems that is just missing that tag in the workspace .csproj.

What can I do to NCrunch create that tag? Or maybe is another thing that I'm not seeing?

Thanks for the reply.

rafael-miceli
#4 Posted : Thursday, July 10, 2014 6:31:01 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/7/2014(UTC)
Posts: 3
Location: Brazil

Hi Remco, I solved my problem but in a complete different way.

Well let me explain, so if something like this (but I think it'll be rare) happen again, you guys from NCrunch will have more documentation to seek.

The thing is. In our application we have a thrid party Dll called "UltEik". But in this Dll there are two classes with the same name but in different Namespaces.

What happens is: when we build, if the tag "<SpecificVersion>" is false then Visual Studio has problems finding the class with the same name but different namespaces.

In our solution we have one legacy WebService that references this Dll. What I was doing, was to move code from the WebService proj to new class libraries proj, to refactor. But the first class library I created (Class Library A) needed to reference the "UltEik" Dll.

So I ended with the WebService referencing the "UltEik" Dll and also referencing class library A that was referencing the "UltEik" also. When I removed the class library A that was referencing the "UltEik" Dll the problems stoped....

Thankyou Anyway.

I think I'll need to refactor everything inside the WebService before export to others class libraries.

But If you know a way to solve the problem of have two projects referencing a Dll that have classes with the same name in different namespaces, and one of these projects is referencing the other, I'll be very thankful.

Thanks.

Remco
#5 Posted : Thursday, July 10, 2014 9:32:41 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Wow, nice work in figuring this out. I'm at a bit of a loss to explain much of this without having the exact same code to experiment with .. but I have to say that MSBuild isn't behaving in the same way as I'd expect it to.

C# generally doesn't experience trouble with classes being under the same name but in different namespaces. I have seen many runtime problems appear from classes being under the same name AND the same namespace, although as this isn't the case in your situation I guess it isn't relevant. Where compile errors can appear in your situation, I would expect them to be reported very differently (i.e. around the code itself, not in the assembly resolution).

The compiler itself is able to disregard referenced assemblies that are not actually used by the codebase (even if they are still referenced). Is it possible that this has made a difference in your case? i.e. if you are deleting references to code in the project you are replacing.

I was thinking that may be one situation where SpecificVersion would be needed by NCrunch would be if you have a conflicting assembly under the same name (but different version) loaded into the GAC.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.061 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download