Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Commit

Permalink
Migrate to .NET 4
Browse files Browse the repository at this point in the history
Fix #131
  • Loading branch information
yck1509 committed Dec 21, 2014
1 parent e65e19f commit 5f37fe4
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 216 deletions.
2 changes: 1 addition & 1 deletion Build/Build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

IF NOT EXIST ..\ConfuserEx.snk COPY ..\ConfuserEx_default.snk ..\ConfuserEx.snk

%windir%\microsoft.net\framework\v4.0.30319\msbuild ..\Confuser2.sln /p:Configuration=Release "/p:Platform=Any CPU" /p:DefineConstants="%1"
%windir%\microsoft.net\framework\v4.0.30319\msbuild ..\Confuser2.sln /p:Configuration=Release "/p:Platform=Any CPU"

IF %ERRORLEVEL% NEQ 0 GOTO err

Expand Down
8 changes: 2 additions & 6 deletions Confuser.CLI/Confuser.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Confuser.CLI</RootNamespace>
<AssemblyName>Confuser.CLI</AssemblyName>
<TargetFrameworkVersion Condition=" !$(DefineConstants.Contains('NET45')) ">v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" !$(DefineConstants.Contains('NET45')) ">v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" $(DefineConstants.Contains('NET45')) ">v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -48,10 +49,6 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" Condition=" !$(DefineConstants.Contains('NET45')) ">
<Private>True</Private>
<HintPath>..\packages\TaskParallelLibrary.1.0.2856.0\lib\Net35\System.Threading.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -94,7 +91,6 @@
<None Include="..\ConfuserEx.snk">
<Link>Properties\ConfuserEx.snk</Link>
</None>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
Expand Down
5 changes: 0 additions & 5 deletions Confuser.CLI/packages.config

This file was deleted.

9 changes: 2 additions & 7 deletions Confuser.Core/Confuser.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Confuser.Core</RootNamespace>
<AssemblyName>Confuser.Core</AssemblyName>
<TargetFrameworkVersion Condition=" !$(DefineConstants.Contains('NET45')) ">v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" !$(DefineConstants.Contains('NET45')) ">v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" $(DefineConstants.Contains('NET45')) ">v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -44,10 +45,6 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" Condition=" !$(DefineConstants.Contains('NET45')) ">
<Private>True</Private>
<HintPath>..\packages\TaskParallelLibrary.1.0.2856.0\lib\Net35\System.Threading.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -125,7 +122,6 @@
<Compile Include="Services\MarkerService.cs" />
<Compile Include="Services\RandomService.cs" />
<Compile Include="Services\TraceService.cs" />
<Compile Include="Tuples.cs" Condition=" !$(DefineConstants.Contains('NET45')) " />
<Compile Include="UnreachableException.cs" />
<Compile Include="Utils.cs" />
</ItemGroup>
Expand All @@ -144,7 +140,6 @@
<None Include="..\ConfuserEx.snk">
<Link>Properties\ConfuserEx.snk</Link>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
148 changes: 0 additions & 148 deletions Confuser.Core/Tuples.cs

This file was deleted.

5 changes: 0 additions & 5 deletions Confuser.Core/packages.config

This file was deleted.

3 changes: 2 additions & 1 deletion Confuser.DynCipher/Confuser.DynCipher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Confuser.DynCipher</RootNamespace>
<AssemblyName>Confuser.DynCipher</AssemblyName>
<TargetFrameworkVersion Condition=" !$(DefineConstants.Contains('NET45')) ">v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" !$(DefineConstants.Contains('NET45')) ">v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" $(DefineConstants.Contains('NET45')) ">v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
8 changes: 2 additions & 6 deletions Confuser.Protections/Confuser.Protections.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Confuser.Protections</RootNamespace>
<AssemblyName>Confuser.Protections</AssemblyName>
<TargetFrameworkVersion Condition=" !$(DefineConstants.Contains('NET45')) ">v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" !$(DefineConstants.Contains('NET45')) ">v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" $(DefineConstants.Contains('NET45')) ">v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -42,10 +43,6 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" Condition=" !$(DefineConstants.Contains('NET45')) ">
<Private>True</Private>
<HintPath>..\packages\TaskParallelLibrary.1.0.2856.0\lib\Net35\System.Threading.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -124,7 +121,6 @@
<None Include="..\ConfuserEx.snk">
<Link>Properties\ConfuserEx.snk</Link>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Confuser.Core\Confuser.Core.csproj">
Expand Down
5 changes: 0 additions & 5 deletions Confuser.Protections/packages.config

This file was deleted.

3 changes: 2 additions & 1 deletion Confuser.Renamer/Confuser.Renamer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Confuser.Renamer</RootNamespace>
<AssemblyName>Confuser.Renamer</AssemblyName>
<TargetFrameworkVersion Condition=" !$(DefineConstants.Contains('NET45')) ">v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" !$(DefineConstants.Contains('NET45')) ">v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" $(DefineConstants.Contains('NET45')) ">v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
20 changes: 0 additions & 20 deletions ConfuserEx/ConfuserEx.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ConfuserEx</RootNamespace>
<AssemblyName>ConfuserEx</AssemblyName>
<TargetFrameworkVersion Condition=" !$(DefineConstants.Contains('NET45')) ">v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion Condition=" $(DefineConstants.Contains('NET45')) ">v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
Expand Down Expand Up @@ -58,10 +56,6 @@
<HintPath>..\deps\Ookii.Dialogs.Wpf.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" Condition=" !$(DefineConstants.Contains('NET45')) ">
<Private>True</Private>
<HintPath>..\packages\TaskParallelLibrary.1.0.2856.0\lib\Net35\System.Threading.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.4.3.31.1\lib\net40\System.Windows.Interactivity.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -246,18 +240,4 @@
<Target Name="AfterBuild">
</Target>
-->
<Target Name="solveAliasProblem">
<ConvertToAbsolutePath Paths="..\packages\TaskParallelLibrary.1.0.2856.0\lib\Net35\System.Threading.dll">
<Output TaskParameter="AbsolutePaths" PropertyName="FullPathOriginal" />
</ConvertToAbsolutePath>
<ItemGroup>
<ReferencePath Remove="$(FullPathOriginal)" />
<ReferencePath Include="$(FullPathOriginal)">
<Aliases>PTL</Aliases>
</ReferencePath>
</ItemGroup>
</Target>
<PropertyGroup Condition=" !$(DefineConstants.Contains('NET45')) ">
<CoreCompileDependsOn>solveAliasProblem;$(PrepareResourcesDependsOn)</CoreCompileDependsOn>
</PropertyGroup>
</Project>
11 changes: 1 addition & 10 deletions ConfuserEx/ViewModel/UI/ProtectTabVM.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#if !NET45
extern alias PTL;
#endif
using System;
using System;
using System.IO;
using System.Windows;
using System.Windows.Documents;
Expand All @@ -10,13 +7,7 @@
using Confuser.Core;
using Confuser.Core.Project;
using GalaSoft.MvvmLight.Command;
#if !NET45
using PTL::System.Threading;
#else
using System.Threading;
#endif

// http://connect.microsoft.com/VisualStudio/feedback/details/615953/

namespace ConfuserEx.ViewModel {
internal class ProtectTabVM : TabViewModel, ILogger {
Expand Down
1 change: 0 additions & 1 deletion ConfuserEx/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
<packages>
<package id="CommonServiceLocator" version="1.2" targetFramework="net40" />
<package id="MvvmLightLibs" version="4.3.31.1" targetFramework="net40" />
<package id="TaskParallelLibrary" version="1.0.2856.0" targetFramework="net40" />
</packages>

0 comments on commit 5f37fe4

Please sign in to comment.