Skip to content

Commit

Permalink
Upgrade project to support VS 2017 (#241)
Browse files Browse the repository at this point in the history
* Upgrade project to VS 2017

Updates BuildBundlerMinifier to run on both MSBuild.exe and dotnet-msbuild.
Update test project to VS2017.
Update BundlerMinifier.Core to build with csproj instead of project.json

* fixup! Upgrade project to VS 2017
  • Loading branch information
natemcmaster authored and madskristensen committed Feb 28, 2017
1 parent c83423b commit 3ed9650
Show file tree
Hide file tree
Showing 23 changed files with 226 additions and 7,242 deletions.
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ indent_size = 4

[*.json]
indent_style = space
indent_size = 2
indent_size = 2

[*.{csproj,xml,props,targets}]
indent_size = 2
indent_style = space
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ packages
*.user
*.sln.docstates
.vs/
.vscode/

# Build results

Expand All @@ -22,4 +23,4 @@ x64/
*.ncrunchsolution
*.ncrunchproject
_NCrunch_WebCompiler
project.lock.json
project.lock.json
20 changes: 9 additions & 11 deletions BundlerMinifier.sln
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26224.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BundlerMinifierVsix", "src\BundlerMinifierVsix\BundlerMinifierVsix.csproj", "{49C270BE-9645-40D5-BE08-91ADE243D394}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BundlerMinifier", "src\BundlerMinifier\BundlerMinifier.csproj", "{B714B5B9-27C4-443C-9517-FE5C5EF46EA2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BundlerMinifierTest", "src\BundlerMinifierTest\BundlerMinifierTest.csproj", "{43AAA3AD-A806-45A0-99A3-F0E7E3B81AEB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E9E392DE-6C44-4AD2-858C-D73AD3016E6E}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
CHANGELOG.md = CHANGELOG.md
global.json = global.json
README.md = README.md
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "BundlerMinifier.Core", "src\BundlerMinifier.Core\BundlerMinifier.Core.xproj", "{135A8112-B264-4FB6-B7B4-6139FB8810D4}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BundlerMinifierVsix", "src\BundlerMinifierVsix\BundlerMinifierVsix.csproj", "{49C270BE-9645-40D5-BE08-91ADE243D394}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BundlerMinifier", "src\BundlerMinifier\BundlerMinifier.csproj", "{B714B5B9-27C4-443C-9517-FE5C5EF46EA2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BundlerMinifierTest", "src\BundlerMinifierTest\BundlerMinifierTest.csproj", "{43AAA3AD-A806-45A0-99A3-F0E7E3B81AEB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BundlerMinifier.Core", "src\BundlerMinifier.Core\BundlerMinifier.Core.csproj", "{135A8112-B264-4FB6-B7B4-6139FB8810D4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
8 changes: 3 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ install:

before_build:
- ps: Vsix-IncrementVsixVersion | Vsix-UpdateBuildVersion
- ps: Vsix-IncrementNuspecVersion .\src\BundlerMinifier\MSBuild\*.nuspec
- ps: Vsix-TokenReplacement src\BundlerMinifier.Core\Constants.cs 'VERSION = "([0-9\\.]+)"' 'VERSION = "{version}"'
- ps: Vsix-TokenReplacement src\BundlerMinifier.Core\project.json '"(1\.0\.0-\*)"' '"{version}"'

build_script:
- nuget restore .\src\BundlerMinifier -Verbosity quiet -PackagesDirectory .\Packages
- dotnet restore BundlerMinifier.sln
- nuget restore .\src\BundlerMinifierVSIX -Verbosity quiet -PackagesDirectory .\Packages
- msbuild .\src\BundlerMinifierVSIX\BundlerMinifierVSIX.csproj /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m
- msbuild .\src\BundlerMinifierTest\BundlerMinifierTest.csproj /p:configuration=Release /v:m
- dotnet restore .\src\BundlerMinifier.Core --ignore-failed-sources -v Error
- dotnet pack src\BundlerMinifier.Core -c Release
- ps: dotnet pack src\BundlerMinifier\ -c Release "/p:Version=${env:APPVEYOR_BUILD_VERSION}"
- ps: dotnet pack src\BundlerMinifier.Core\ -c Release "/p:Version=${env:APPVEYOR_BUILD_VERSION}"

after_test:
- ps: Vsix-PushArtifacts | Vsix-PublishToGallery .\src\BundlerMinifierVsix\**\*.vsix
Expand Down
3 changes: 0 additions & 3 deletions global.json

This file was deleted.

35 changes: 35 additions & 0 deletions src/BundlerMinifier.Core/BundlerMinifier.Core.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\common.props" />

<PropertyGroup>
<Version>1.0.0</Version>
<TargetFrameworks>netcoreapp1.0;net452</TargetFrameworks>
<DefineConstants>$(DefineConstants);DOTNET</DefineConstants>
<AssemblyName>dotnet-bundle</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>BundlerMinifier.Core</PackageId>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>

<!--
TODO remove RuntimeIdentifier and PlatformTarget when VS 2017 RTM's.
This was required for RC, but not for RTM.
-->
<RuntimeIdentifier Condition="'$(TargetFramework)' != 'netcoreapp1.0'">win7-x64</RuntimeIdentifier>
<PlatformTarget Condition="'$(TargetFramework)' != 'netcoreapp1.0'">AnyCPU</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<!--
This file instructs dotnet.exe to use whichever version of .NET Core is installed,
which may not be the version this tool is compiled against.
-->
<Content Include="prefercliruntime" Pack="true" PackagePath="\prefercliruntime" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="NUglify" Version="1.5.4" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>

</Project>
21 changes: 0 additions & 21 deletions src/BundlerMinifier.Core/BundlerMinifier.Core.xproj

This file was deleted.

Empty file.
38 changes: 0 additions & 38 deletions src/BundlerMinifier.Core/project.json

This file was deleted.

Loading

0 comments on commit 3ed9650

Please sign in to comment.