Skip to content
This repository has been archived by the owner on Sep 21, 2018. It is now read-only.

React to project.json schema changes and tooling package renames #536

Merged
merged 3 commits into from
May 4, 2016
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BaseTemplates/ConsoleApp/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "1.0.0-*",
"compilationOptions": {
"buildOptions": {
"emitEntryPoint": true
},

Expand Down
21 changes: 9 additions & 12 deletions src/BaseTemplates/EmptyWeb/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,22 @@
"$netframeworkversion$": { }$endif$
},

"compilationOptions": {
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
$if$ ($context$ == WebCore)
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
"gcServer": true
},
$endif$
"content": [
"wwwroot",
"web.config"
],

"exclude": [
"node_modules"
],
"publishOptions": {
"include": [
"wwwroot",
"web.config"
],
"exclude": [ "node_modules" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "exclude" shouldn't be needed at all. You will however need to include the appsettings.json

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And you need to include "Views" for MVC apps too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saw these are separate files, carry on.

},

"scripts": {$if$ ($aspnet_useplatformhandler$ == false)$else$
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]$endif$
Expand Down
35 changes: 16 additions & 19 deletions src/BaseTemplates/StarterWeb/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"version": "__NetCorePlatformVersion__",
"type": "platform"
},$endif$
"dotnet-razor-tooling": {
"Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
"Microsoft.AspNetCore.Mvc": "1.0.0-*",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "__AspNetCorePlatformVersion__",
"type": "build"
},
"Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
"Microsoft.AspNetCore.Mvc": "1.0.0-*",$if$ ($aspnet_useplatformhandler$ == false)$else$
},$if$ ($aspnet_useplatformhandler$ == false)$else$
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",$endif$
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNetCore.StaticFiles": "1.0.0-*",
Expand All @@ -22,7 +22,7 @@
},

"tools": {
"dotnet-razor-tooling": {
"Microsoft.AspNetCore.Razor.Tools": {
"version": "__AspNetCorePlatformVersion__",
"imports": "portable-net45+win8+dnxcore50"
}$if$ ($aspnet_useplatformhandler$ == false)$else$,
Expand All @@ -43,27 +43,24 @@
"$netframeworkversion$": { }$endif$
},

"compilationOptions": {
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
$if$ ($context$ == WebCore)
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
"gcServer": true
},
$endif$
"content": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
],

"exclude": [
"node_modules"
],
"publishOptions": {
"include": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
],
"exclude": [ "node_modules" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't need this "exclude" as above

},

"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]$if$ ($aspnet_useplatformhandler$ == false)$else$,
Expand Down
25 changes: 11 additions & 14 deletions src/BaseTemplates/WebAPI/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,24 @@
"$netframeworkversion$": { }$endif$
},

"compilationOptions": {
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
$if$ ($context$ == WebCore)
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
"gcServer": true
},
$endif$
"content": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
],

"exclude": [
"node_modules"
],
"publishOptions": {
"include": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
],
"exclude": [ "node_modules" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't need this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the reason we had the exludes in there for all the web templates is so if customers start installing node packages we automatically exclude them, even though these templates don't ship with node modules by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah. that's what I remember @madskristensen do we need to exclude the node_modules?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the template doesn't have a node_modules folder then there is no reason to exclude it at all. That would just be confusing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course. @phenning we only need it only for the Starter Web templates then which have a node_modules folder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need it at all anymore, due to the way concerns will split between publish and build. I confirmed this offline with Damian.

},

"scripts": {$if$ ($aspnet_useplatformhandler$ == false)$else$
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]$endif$
Expand Down
63 changes: 32 additions & 31 deletions src/Rules/StarterWeb/AI/IndividualAuth/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@
"version": "__NetCorePlatformVersion__",
"type": "platform"
},$endif$
"dotnet-aspnet-codegenerator": {
"version": "__AspNetCorePlatformVersion__",
"type": "build"
},
"dotnet-razor-tooling": {
"version": "__AspNetCorePlatformVersion__",
"type": "build"
},
"Microsoft.ApplicationInsights.AspNetCore": "__ApplicationInsightsPackageVersion__",
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-*",
"Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
"Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0-*",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0-*",
"Microsoft.AspNetCore.Mvc": "1.0.0-*",$if$ ($aspnet_useplatformhandler$ == false)$else$
"Microsoft.AspNetCore.Mvc": "1.0.0-*",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "__AspNetCorePlatformVersion__",
"type": "build"
},$if$ ($aspnet_useplatformhandler$ == false)$else$
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",$endif$
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNetCore.StaticFiles": "1.0.0-*",
Expand All @@ -28,6 +24,14 @@
"version": "__AspNetCorePlatformVersion__",
"type": "build"
},
"Microsoft.Extensions.CodeGeneration.Tools": {
"version": "__AspNetCorePlatformVersion__",
"type": "build"
},
"Microsoft.Extensions.CodeGenerators.Mvc": {
"version": "__AspNetCorePlatformVersion__",
"type": "build"
},
"Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-*",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-*",
"Microsoft.Extensions.Configuration.Json": "1.0.0-*",
Expand All @@ -39,14 +43,7 @@
},

"tools": {
"dotnet-aspnet-codegenerator": {
"version": "__AspNetCorePlatformVersion__",
"imports": [
"portable-net45+win8+dnxcore50",
"portable-net45+win8"
]
},
"dotnet-razor-tooling": {
"Microsoft.AspNetCore.Razor.Tools": {
"version": "__AspNetCorePlatformVersion__",
"imports": "portable-net45+win8+dnxcore50"
},$if$ ($aspnet_useplatformhandler$ == false)$else$
Expand All @@ -61,6 +58,13 @@
"portable-net45+win8"
]
},
"Microsoft.Extensions.CodeGeneration.Tools": {
"version": "__AspNetCorePlatformVersion__",
"imports": [
"portable-net45+win8+dnxcore50",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know why both of these imports are required here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, net45+win8+dnxcore50 is required to get the proper version of json.net, just specifying net45+win8 nets you a json.net that has a fx dependency on System.Runtime 2.0.5.0

net45+win8 is required for Ix.Async and Remotion

"portable-net45+win8"
]
},
"Microsoft.Extensions.SecretManager.Tools": {
"version": "__AspNetCorePlatformVersion__",
"imports": "portable-net45+win8+dnxcore50"
Expand All @@ -78,27 +82,24 @@
"$netframeworkversion$": { }$endif$
},

"compilationOptions": {
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
$if$ ($context$ == WebCore)
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
"gcServer": true
},
$endif$
"content": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
],

"exclude": [
"node_modules"
],
"publishOptions": {
"include": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
],
"exclude": [ "node_modules" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't need this

},

"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]$if$ ($aspnet_useplatformhandler$ == false)$else$,
Expand Down
37 changes: 17 additions & 20 deletions src/Rules/StarterWeb/AI/NoAuth/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"version": "__NetCorePlatformVersion__",
"type": "platform"
},$endif$
"dotnet-razor-tooling": {
"version": "__AspNetCorePlatformVersion__",
"type": "build"
},
"Microsoft.ApplicationInsights.AspNetCore": "__ApplicationInsightsPackageVersion__",
"Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
"Microsoft.AspNetCore.Mvc": "1.0.0-*",$if$ ($aspnet_useplatformhandler$ == false)$else$
"Microsoft.AspNetCore.Mvc": "1.0.0-*",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "__AspNetCorePlatformVersion__",
"type": "build"
},$if$ ($aspnet_useplatformhandler$ == false)$else$
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",$endif$
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNetCore.StaticFiles": "1.0.0-*",
Expand All @@ -23,7 +23,7 @@
},

"tools": {
"dotnet-razor-tooling": {
"Microsoft.AspNetCore.Razor.Tools": {
"version": "__AspNetCorePlatformVersion__",
"imports": "portable-net45+win8+dnxcore50"
}$if$ ($aspnet_useplatformhandler$ == false)$else$,
Expand All @@ -44,27 +44,24 @@
"$netframeworkversion$": { }$endif$
},

"compilationOptions": {
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
$if$ ($context$ == WebCore)
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
"gcServer": true
},
$endif$
"content": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
],

"exclude": [
"node_modules"
],
"publishOptions": {
"include": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
],
"exclude": [ "node_modules" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't need this

},

"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]$if$ ($aspnet_useplatformhandler$ == false)$else$,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"version": "__NetCorePlatformVersion__",
"type": "platform"
},$endif$
"dotnet-razor-tooling": {
"version": "__AspNetCorePlatformVersion__",
"type": "build"
},
"Microsoft.ApplicationInsights.AspNetCore": "__ApplicationInsightsPackageVersion__",
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-*",
"Microsoft.AspNetCore.Authentication.OpenIdConnect": "0.1.0-*",
"Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
"Microsoft.AspNetCore.Mvc": "1.0.0-*",$if$ ($aspnet_useplatformhandler$ == false)$else$
"Microsoft.AspNetCore.Mvc": "1.0.0-*",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "__AspNetCorePlatformVersion__",
"type": "build"
},$if$ ($aspnet_useplatformhandler$ == false)$else$
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",$endif$
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNetCore.StaticFiles": "1.0.0-*",
Expand All @@ -28,10 +28,10 @@
},

"tools": {
"dotnet-razor-tooling": {
"Microsoft.AspNetCore.Razor.Tools": {
"version": "__AspNetCorePlatformVersion__",
"imports": "portable-net45+win8+dnxcore50"
},$if$ ($aspnet_useplatformhandler$ == false)$else$
}$if$ ($aspnet_useplatformhandler$ == false)$else$,
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "__AspNetCorePlatformVersion__",
"imports": "portable-net45+win8+dnxcore50"
Expand All @@ -53,27 +53,24 @@
"$netframeworkversion$": { }$endif$
},

"compilationOptions": {
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
$if$ ($context$ == WebCore)
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
"gcServer": true
},
$endif$
"content": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
],

"exclude": [
"node_modules"
],
"publishOptions": {
"include": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
],
"exclude": [ "node_modules" ]
},

"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]$if$ ($aspnet_useplatformhandler$ == false)$else$,
Expand Down
Loading