Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
2.67/5 (3 votes)
See more:
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



CSS
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 content added from comment

XML
<?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]
Posted
Updated 4-Jul-15 1:31am
v2

1 solution

 
Share this answer
 
Comments
Ger Hayden 3-Jul-15 15:34pm    
I forgot to mention I have added the file to the project but it did not resolve the error.
Ger Hayden 3-Jul-15 15:35pm    
However - there are a few extra tricks in your link that I will have to explore...
phil.o 3-Jul-15 16:41pm    
Do you mean there are no entry in your .csproj with a link tag inside a compile include tag? Have you checked all .csproj files, from all the projects of your solution? It could be somewhere you don't expect it to. Also, maybe the problem could lie in the .sln file.
Ger Hayden 4-Jul-15 4:50am    
Hi Phil.

That is what I have to check. When I last tried it all I did was the Project > Add Existing Item

Ger
Ger Hayden 4-Jul-15 6:37am    
This is the CSPROJ from SharpMrcMain. I can see the "Log.Debug.config" but it's outside the compile block

<?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>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900