2013-07-26 2 views
1

저는 몇 년 동안 계속 해왔 던 해결책이 있습니다. 오늘 저는 몇 달 동안 계속해서 새로운 프로젝트를 추가했습니다. 모든 것이 잘되고 코딩되었습니다. 빌드를하고 내가 추가 한 프로젝트 참조를 찾을 수 없다는 것을 알았습니다. Visual Studio 2012에서 다른 프로젝트를 참조하는 새 프로젝트를 만들지 못함

형식 또는 네임 스페이스 이름 '어쩌구'

찾을 수 없습니다 (당신이 누락되어 사용 direcive 또는 어셈블리 참조가?)

이 참조가 동일한 솔루션에 프로젝트이며, 그들이 확인 CSPROJ 파일의 프로젝트 참조 Visual Studio에서는 참조 된 개체를 기준으로 코드를 작성할 수 있으므로 참조를 찾는 데 문제가 없습니다. 내가 문제를 제기 할 때만입니다. 현재 AnyCPU로 디버그 중입니다.

Google 검색을 수행하면서 대상 프로젝트가 될 수 있다는 생각을 계속 유지했습니다. 새 프로젝트 또는 참조에 .NET 4 Client Profile이 있습니다. 그러나 이것은 사실이 아닙니다. 모든 프로젝트는 클라이언트 프로파일이 아니라 .NET 4입니다. 훨씬 더 괴상한 것은 이러한 참조가 기존 프로젝트에서 모두 잘 작동한다는 것입니다.

새 프로젝트를 만들면 .NET 4.5의 대상 프레임 워크에 문제가 있다고 생각하는 .NET 4.5를 만들면 얻을 수 있습니다. 현재 무엇을해야할지 모르겠다.

아래는 프로젝트 파일입니다. 파일 이름과 프로젝트 이름을 지워야했습니다.

<?xml version="1.0" encoding="utf-8"?> 
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
    <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> 
    <ProjectGuid>{48AED04F-6928-45F4-8C1D-A5E6713B5120}</ProjectGuid> 
    <OutputType>Library</OutputType> 
    <AppDesignerFolder>Properties</AppDesignerFolder> 
    <RootNamespace>MyNamespace</RootNamespace> 
    <AssemblyName>MyNamespace</AssemblyName> 
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> 
    <FileAlignment>512</FileAlignment> 
    <TargetFrameworkProfile /> 
    </PropertyGroup> 
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 
    <DebugSymbols>true</DebugSymbols> 
    <DebugType>full</DebugType> 
    <Optimize>false</Optimize> 
    <OutputPath>..\Build\Debug\</OutputPath> 
    <DefineConstants>DEBUG;TRACE</DefineConstants> 
    <ErrorReport>prompt</ErrorReport> 
    <WarningLevel>4</WarningLevel> 
    <Prefer32Bit>false</Prefer32Bit> 
    </PropertyGroup> 
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 
    <DebugType>pdbonly</DebugType> 
    <Optimize>true</Optimize> 
    <OutputPath>bin\Release\</OutputPath> 
    <DefineConstants>TRACE</DefineConstants> 
    <ErrorReport>prompt</ErrorReport> 
    <WarningLevel>4</WarningLevel> 
    <Prefer32Bit>false</Prefer32Bit> 
    </PropertyGroup> 
    <ItemGroup> 
    <Reference Include="System" /> 
    <Reference Include="System.Core" /> 
    <Reference Include="System.Xml.Linq" /> 
    <Reference Include="System.Data.DataSetExtensions" /> 
    <Reference Include="Microsoft.CSharp" /> 
    <Reference Include="System.Data" /> 
    <Reference Include="System.Xml" /> 
    </ItemGroup> 
    <ItemGroup> 
    <Compile Include="SomeFileThatReferences.cs" /> 
    <Compile Include="Properties\AssemblyInfo.cs" /> 
    </ItemGroup> 
    <ItemGroup> 
    <ProjectReference Include="..\Ref1.csproj"> 
     <Project>{6E0EEABF-52D7-4020-9242-AFDC33B5DAA0}</Project> 
     <Name>Billing.Bills</Name> 
    </ProjectReference> 
    <ProjectReference Include="..\Ref2.csproj"> 
     <Project>{6764A403-DA4C-42FF-A89F-E1EEA7FEF0A3}</Project> 
     <Name>Billing.Business</Name> 
    </ProjectReference> 
    <ProjectReference Include="..\Ref3.csproj"> 
     <Project>{9D9AB79F-D52A-4EC8-B2B7-9C605EFDBFDE}</Project> 
     <Name>Billing.Reports</Name> 
    </ProjectReference> 
    <ProjectReference Include="..\Csla\Csla.Net4\Csla.Net4.csproj"> 
     <Project>{1FCE45FF-C391-4ED1-A9C4-F71CAF8773E6}</Project> 
     <Name>Csla.Net4</Name> 
    </ProjectReference> 
    <ProjectReference Include="..\Ref4.csproj"> 
     <Project>{3972242B-DF6A-4B9B-9121-6138090CA114}</Project> 
     <Name>Core</Name> 
    </ProjectReference> 
    </ItemGroup> 
    <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 
    <!-- 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> 
    --> 
</Project> 

미리 답변 해 주셔서 감사합니다.

+0

2012는 지금까지 테스트 한 프레임 워크 4.0을 지원하지 않는 것 같습니다 ... 나는 틀린 것 같습니다. 아직 모든 것을 시도하지 않았습니다 ... – legrandviking

+0

그게 이상합니다. 참조 된 파일이 .NET 4.5가 될 것 같습니다. – Jonesopolis

+4

@legrandviking - VS 2012가 가장 확실하게 지원됩니다. – EkoostikMartin

답변

2

알아 냈어. 분명히 나에게 알려지지 않은 참조를 놓쳤다. 다른 모든 프로젝트는 Microsoft의 BCL Portability Pack을 참조하고있었습니다. 일단 NuGet에서 그것을 보았고 모든 프로젝트가 새로운 프로젝트를 제외하고는 그것을 즉시 보았습니다. 즉시이를 참조 했으므로 이제 모든 것이 빌드됩니다.

재미있는 고스트 사냥이었습니다.

0

이 성가신 오류의 또 다른 이유입니다. 경고 메시지를보고이를 발견했습니다.

6 주 참조 경고 : 빌드에 오류 메시지가 필요한 정보를 제공하지 않았다 : 그것은 때문에 "C를 ... 경로 - 투 - 당신을-솔루션을-REF이 된 .dll" 확인할 수 없습니다 ".NETFramework, Version = v4.5.1"프레임 워크에 대해 작성되었습니다. 현재 대상 프레임 워크 인 ".NETFramework, Version = v4.5"보다 높은 버전 입니다.

VStudio를 새로 설치할 때 기본 프로젝트가 아직 상위 버전으로 설정되지 않은 것처럼 보입니다. 따라서 버전 불일치 (낮은 버전에서 높은 버전을 참조)가이 작업을 수행합니다.

관련 문제