如何通过此编译错误 [英] How do I get past this compile error
问题描述
我下载了这个模型铁路项目 SharpMRC - 这是一项古老的.NET工作。
我在Log4J遇到困难(我想)。我已经完成了软件包更新并将所有内容迁移到.NET 4.5但没有运气7
这就是我得到的:
警告1无法将文件Log.Debug.config添加到项目中。无法添加指向文件C:\ Rail \SharpMrc \ src \ Main \SharpMrcMain \Project \ Log.Debug.config的链接。该文件位于项目目录树中。 SharpMrc
警告2无法将Log.Release.config文件添加到项目中。无法添加文件C:\ Rail \SharpMrc \ src \ Main \ SharpMrcMain \Project \Log.Release.config的链接。该文件位于项目目录树中。 SharpMrc
I downloaded this model rail project SharpMRC - its an ancient .NET effort.
I'm getting difficulties around Log4J (I think). I've done a package update and migrated everything to .NET 4.5 but with no luck7
This is what i am getting:
Warning 1 The file 'Log.Debug.config' could not be added to the project. Cannot add a link to the file C:\Rail\SharpMrc\src\Main\SharpMrcMain\Project\Log.Debug.config. This file is within the project directory tree. SharpMrc
Warning 2 The file 'Log.Release.config' could not be added to the project. Cannot add a link to the file C:\Rail\SharpMrc\src\Main\SharpMrcMain\Project\Log.Release.config. This file is within the project directory tree. SharpMrc
1>------ Rebuild All started: Project: SharpMrc.Base, Configuration: Debug Any CPU ------
2>------ Rebuild All started: Project: SharpMrc, Configuration: Debug Any CPU ------
3>------ Rebuild All started: Project: IntelliBox, Configuration: Debug Any CPU ------
4>------ Rebuild All started: Project: DataEditors, Configuration: Debug Any CPU ------
5>------ Rebuild All started: Project: SpeechSynthesis, Configuration: Debug Any CPU ------
6>------ Rebuild All started: Project: AvrSwitchboard, Configuration: Debug Any CPU ------
7>------ Rebuild All started: Project: GraphicalSwitchboard, Configuration: Debug Any CPU ------
8>------ Rebuild All started: Project: IpcAtChipDisplay, Configuration: Debug Any CPU ------
========== Rebuild All: 0 succeeded, 8 failed, 0 skipped ==========
[edit] .csproj从评论添加的内容
[edit] .csproj content added from comment
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<ProjectGuid>{AE7247D6-6E76-4C64-8085-3FEE43AF1D97}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>SharpMrc</RootNamespace>
<AssemblyName>SharpMrc</AssemblyName>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\..\SharpMrc.snk</AssemblyOriginatorKeyFile>
<DelaySign>False</DelaySign>
<AssemblyOriginatorKeyMode>File</AssemblyOriginatorKeyMode>
<OutputPath>..\..\..\..\bin\</OutputPath>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<StartupObject>SharpMrc.SharpMrcMain</StartupObject>
<RunCodeAnalysis>False</RunCodeAnalysis>
<CodeAnalysisRules>-Microsoft.Globalization#CA1303</CodeAnalysisRules>
<ApplicationIcon>..\..\..\Images\Locomotive.ico</ApplicationIcon>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileUpgradeFlags></FileUpgradeFlags>
<UpgradeBackupLocation></UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<OutputType>WinExe</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<ItemGroup>
<Reference Include="ICSharpCode.Core">
<HintPath>..\..\..\Libraries\ICSharpCode.Core\ICSharpCode.Core.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="log4net">
<HintPath>..\..\..\packages\log4net.2.0.3\lib\net20-full\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Configuration\GlobalAssemblyInfo.cs</Link>
</Compile>
<None Include="Configuration\AssemblyInfo.template.cs" />
<Compile Include="Src\SharpMrcMain.cs" />
<Compile Include="Src\SplashScreenForm.cs">
<SubType>
[/ edit]
[/edit]
推荐答案
(配置)'=='' > Debug < / C onfiguration >
< 平台 条件 = '
(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '
(平台)'=='' > AnyCPU < / Platform >
< RootNamespace > SharpMrc < / RootNamespace >
< AssemblyName > SharpMrc < / AssemblyName >
< SignAssembly > True < / SignAssembly >
< AssemblyOriginatorKeyFile > .. \..\..\SharpMrc.snk < / AssemblyOriginatorKeyFile >
< DelaySign > False < / DelaySign >
< AssemblyOriginatorKeyMode > 文件< / AssemblyOriginatorKeyMode >
< OutputPath > .. \..\..\\\..\bin \ < / OutputPath >
< AllowUnsafeBlocks > False < / AllowUnsafeBlocks >
< NoStdLib > 假< / NoStdLib >
< WarningLevel > 4 < / WarningLevel >
< TreatWarningsAsErrors > false < / TreatWarningsAsErrors >
< StartupObject > SharpMrc.SharpMrcMain < / StartupObject >
< span class =code-keywor d>< RunCodeAnalysis > False < / RunCodeAnalysis >
< CodeAnalysisRules > -Microsoft.Globalization#CA1303 < / CodeAnalysisRules >
< ApplicationIcon > .. \。 .\..\Images\Locomotive.ico</ApplicationIcon>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileUpgradeFlags></FileUpgradeFlags>
<UpgradeBackupLocation></UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=\" '
(Platform)' == '' ">AnyCPU</Platform> <RootNamespace>SharpMrc</RootNamespace> <AssemblyName>SharpMrc</AssemblyName> <SignAssembly>True</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\SharpMrc.snk</AssemblyOriginatorKeyFile> <DelaySign>False</DelaySign> <AssemblyOriginatorKeyMode>File</AssemblyOriginatorKeyMode> <OutputPath>..\..\..\..\bin\</OutputPath> <AllowUnsafeBlocks>False</AllowUnsafeBlocks> <NoStdLib>False</NoStdLib> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>false</TreatWarningsAsErrors> <StartupObject>SharpMrc.SharpMrcMain</StartupObject> <RunCodeAnalysis>False</RunCodeAnalysis> <CodeAnalysisRules>-Microsoft.Globalization#CA1303</CodeAnalysisRules> <ApplicationIcon>..\..\..\Images\Locomotive.ico</ApplicationIcon> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <FileUpgradeFlags></FileUpgradeFlags> <UpgradeBackupLocation></UpgradeBackupLocation> <OldToolsVersion>2.0</OldToolsVersion> </PropertyGroup> <PropertyGroup Condition=" '
(Configuration)' == 'Debug' \">
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugTyp e>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup Condition=\" '
(Configuration)' == 'Debug' "> <DebugSymbols>true</DebugSymbols> <DebugType>Full</DebugType> <Optimize>False</Optimize> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <DefineConstants>DEBUG;TRACE</DefineConstants> <OutputType>Exe</OutputType> </PropertyGroup> <PropertyGroup Condition=" '
这篇关于如何通过此编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!