-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d35cd7
commit 3480bcf
Showing
17 changed files
with
213 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
samples/RazorLibrary/ExampleRazorLibraryVB/Views/web.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0"?> | ||
<configuration> | ||
<configSections> | ||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> | ||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> | ||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> | ||
</sectionGroup> | ||
</configSections> | ||
<system.web.webPages.razor> | ||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | ||
<pages pageBaseType="System.Web.Mvc.WebViewPage"> | ||
<namespaces> | ||
<add namespace="System.Web.Mvc" /> | ||
<add namespace="System.Web.Mvc.Ajax" /> | ||
<add namespace="System.Web.Mvc.Html" /> | ||
<add namespace="System.Web.Optimization" /> | ||
<add namespace="ExampleRazorLibrary" /> | ||
</namespaces> | ||
</pages> | ||
</system.web.webPages.razor> | ||
<appSettings> | ||
<add key="webpages:Enabled" value="false" /> | ||
</appSettings> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> | ||
</dependentAssembly> | ||
</assemblyBinding> | ||
</runtime> | ||
<system.webServer> | ||
<handlers> | ||
<remove name="BlockViewHandler" /> | ||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" /> | ||
</handlers> | ||
</system.webServer> | ||
<system.web> | ||
<compilation> | ||
<assemblies> | ||
<add assembly="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | ||
</assemblies> | ||
</compilation> | ||
</system.web> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
....SDK.SystemWeb.RazorLibrary/Sdk/MSBuild.SDK.SystemWeb.RazorLibrary.BindingRedirects.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<OverwriteAppConfigWithBindingRedirects Condition="'$(OverwriteAppConfigWithBindingRedirects)'==''">true</OverwriteAppConfigWithBindingRedirects> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(OverwriteAppConfigWithBindingRedirects)'=='true'"> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType> | ||
</PropertyGroup> | ||
</Project> |
43 changes: 43 additions & 0 deletions
43
...DK.SystemWeb.RazorLibrary/Sdk/MSBuild.SDK.SystemWeb.RazorLibrary.BindingRedirects.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Target Name="UpdateConfigWithBindingRedirects" AfterTargets="AfterBuild" Condition="'$(OverwriteAppConfigWithBindingRedirects)'=='true'"> | ||
<ItemGroup> | ||
<_DllConfig Remove="@(_DllConfig)" /> | ||
<_AppConfig Remove="@(_AppConfig)" /> | ||
<_ConfigFile Remove="@(_ConfigFileHash)" /> | ||
<_DllConfig Include="$(OutDir)$(AssemblyName).dll.config" /> | ||
<_AppConfig Include="web.config" /> | ||
</ItemGroup> | ||
<GetFileHash Files="@(_DllConfig)"> | ||
<Output TaskParameter="Hash" PropertyName="_DllConfigHash" /> | ||
<Output TaskParameter="Items" ItemName="_DllConfigFileHash" /> | ||
</GetFileHash> | ||
<GetFileHash Files="@(_AppConfig)"> | ||
<Output TaskParameter="Hash" PropertyName="_AppConfigHash" /> | ||
<Output TaskParameter="Items" ItemName="_AppConfigFileHash" /> | ||
</GetFileHash> | ||
<ItemGroup> | ||
<_ConfigFileHash Include="@(_DllConfigFileHash)" /> | ||
<_ConfigFileHash Include="@(_AppConfigFileHash)" /> | ||
</ItemGroup> | ||
<Message Text="%(_ConfigFileHash.Identity): %(_ConfigFileHash.FileHash)" Importance="high" /> | ||
<Warning Text="Replacing web.config due to changes during compile - This should clear warning MSB3276 on next compile" File="web.config" Condition="'$(_DllConfigHash)'!='$(_AppConfigHash)'" /> | ||
<PropertyGroup> | ||
<ConfigNameSpaces><Namespace Prefix='asm' Uri='urn:schemas-microsoft-com:asm.v1' /></ConfigNameSpaces> | ||
</PropertyGroup> | ||
<XmlPeek XmlInputPath="$(OutDir)$(AssemblyName).dll.config" | ||
Namespaces="$(ConfigNameSpaces)" | ||
Query="/configuration/runtime/asm:assemblyBinding/asm:dependentAssembly" Condition="'$(_DllConfigHash)'!='$(_AppConfigHash)'"> | ||
<Output TaskParameter="Result" ItemName="_bindings" /> | ||
</XmlPeek> | ||
<Message Text="New Bindings: %(_bindings.Indentity)" Importance="high" /> | ||
<PropertyGroup> | ||
<Bindings>@(_bindings ,'')</Bindings> | ||
</PropertyGroup> | ||
<XmlPoke XmlInputPath="%(RazorAppConfigFiles.Identity)" | ||
Namespaces="$(ConfigNameSpaces)" | ||
Query="/configuration/runtime/asm:assemblyBinding" | ||
Value="$(Bindings)" | ||
Condition="'$(_DllConfigHash)'!='$(_AppConfigHash)' AND '@(RazorAppConfigFiles)'!=''"/> | ||
<Copy SourceFiles="$(OutDir)$(AssemblyName).dll.config" DestinationFiles="web.config" Condition="'$(_DllConfigHash)'!='$(_AppConfigHash)'" /> | ||
</Target> | ||
</Project> |
6 changes: 6 additions & 0 deletions
6
...uild.SDK.SystemWeb.RazorLibrary/Sdk/MSBuild.SDK.SystemWeb.RazorLibrary.DefaultItems.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<DefaultItemExcludes>$(DefaultItemExcludes);**\web.config</DefaultItemExcludes> | ||
<DefaultItemExcludes>$(DefaultItemExcludes);web.config</DefaultItemExcludes> | ||
</PropertyGroup> | ||
</Project> |
9 changes: 9 additions & 0 deletions
9
...ld.SDK.SystemWeb.RazorLibrary/Sdk/MSBuild.SDK.SystemWeb.RazorLibrary.DefaultItems.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<ItemGroup Condition="$(EnableDefaultItems)"> | ||
<None Include="web.config" /> | ||
<RazorAppConfigFiles Include="Views/web.config" Condition="EXISTS('Views/web.config')" /> | ||
<RazorAppConfigFiles Include="Areas/**/web.config" /> | ||
</ItemGroup> | ||
|
||
</Project> |
13 changes: 8 additions & 5 deletions
13
...d.SDK.SystemWeb.RazorLibrary/Sdk/MSBuild.SDK.SystemWeb.RazorLibrary.DefaultPackages.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<MicrosoftAspNetMvc_Version>5.2.7</MicrosoftAspNetMvc_Version> | ||
<RazorGeneratorMSBuild_Version>2.5.0</RazorGeneratorMSBuild_Version> | ||
<RazorGeneratorMVC_Version>2.4.9</RazorGeneratorMVC_Version> | ||
<MicrosoftNetCompilersToolset_Version>3.8.0</MicrosoftNetCompilersToolset_Version> | ||
<MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version>3.6.0</MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version> | ||
<ExcludeDefaultRazorPackages Condition="'$(ExcludeDefaultRazorPackages)'==''">false</ExcludeDefaultRazorPackages> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(ExcludeDefaultRazorPackages)'=='false'"> | ||
<MicrosoftAspNetMvc_Version Condition="'$(MicrosoftAspNetMvc_Version)'==''">5.2.7</MicrosoftAspNetMvc_Version> | ||
<RazorGeneratorMSBuild_Version Condition="'$(RazorGeneratorMSBuild_Version)'==''">2.5.0</RazorGeneratorMSBuild_Version> | ||
<RazorGeneratorMVC_Version Condition="'$(RazorGeneratorMVC_Version)'==''">2.4.9</RazorGeneratorMVC_Version> | ||
<MicrosoftNetCompilersToolset_Version Condition="'$(MicrosoftNetCompilersToolset_Version)'==''">3.8.0</MicrosoftNetCompilersToolset_Version> | ||
<MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version Condition="'$(MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version)'==''">3.6.0</MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.