-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
d1d5241
to
cd64805
Compare
makefile.shade
Outdated
k-standard-goals | ||
|
||
#restore-nuget-packages target='initialize' | ||
exec program='${Path.Combine(Directory.GetCurrentDirectory(), ".build", "nuget.exe")}' commandline='restore Mvc.sln' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The equivalent code in Razor was to support building the vsix, so I don't think this is needed here. If you're trying to "select" the sln, you need to use dotnet restore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 remove if possible
samples/MvcSandbox/MvcSandbox.csproj
Outdated
|
||
<PropertyGroup> | ||
<TargetFrameworks>net451;netcoreapp1.1</TargetFrameworks> | ||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64</RuntimeIdentifiers> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove.
samples/MvcSandbox/MvcSandbox.csproj
Outdated
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Content Update="Views\**\*;web.config;wwwroot"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Content Update="Views\**\*;web.config;wwwroot" CopyToPublishDirectory="PreserveNewest" />
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this whole line can be removed. IIUC this is handled by default by Microsoft.NET.Sdk.Web
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It knows about the Views folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked offline, it knows about *.cshtml
samples/MvcSandbox/MvcSandbox.csproj
Outdated
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.2.0-*" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Razor" Version="1.2.0-*" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this + the next one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do, why was it added in the project.json world?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea. Maybe a remnant from when we did not have Microsoft.AspNet.Mvc
and had individual projects?
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Routing.Abstractions" Version="1.2.0-*" /> | ||
<PackageReference Include="Microsoft.Extensions.ClosedGenericMatcher.Sources" Version="1.2.0-*"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<PackageReference Include="Microsoft.Extensions.ClosedGenericMatcher.Sources" Version="1.2.0-*" PrivateAssets="All" />
and similarly below.
<PropertyGroup> | ||
<TargetFrameworks>net451;netcoreapp1.1</TargetFrameworks> | ||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64</RuntimeIdentifiers> | ||
<RuntimeIdentifier Condition=" '$(TargetFramework)' == 'net451' ">win7-x86</RuntimeIdentifier> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x64?
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Content Update="web.config"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could remove these. We don't actually do any IIS publishing tests so this isn't super necessary. I'll leave it up to you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove it be Microsoft.NET.Sdk.Web finds the web.config file by default.
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.2.0-*" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' "> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.2.0-*" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' "> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove x n
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<EmbeddedResource Include="EmbeddedResources\**" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think you can remove the the Exclude
node.
deploy: off | ||
# Required for dotnet-test to work | ||
os: Visual Studio 2015 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Visual Studio 2017 RC
makefile.shade
Outdated
k-standard-goals | ||
|
||
#restore-nuget-packages target='initialize' | ||
exec program='${Path.Combine(Directory.GetCurrentDirectory(), ".build", "nuget.exe")}' commandline='restore Mvc.sln' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 remove if possible
samples/MvcSandbox/MvcSandbox.csproj
Outdated
<PropertyGroup> | ||
<TargetFrameworks>net451;netcoreapp1.1</TargetFrameworks> | ||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64</RuntimeIdentifiers> | ||
<RuntimeIdentifier Condition=" '$(TargetFramework)' == 'net451' ">win7-x86</RuntimeIdentifier> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make this work, you need to invert the logic:
Condition=" '$(TargetFramework)' != 'netcoreapp1.1' "
samples/MvcSandbox/MvcSandbox.csproj
Outdated
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Content Update="Views\**\*;web.config;wwwroot"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this whole line can be removed. IIUC this is handled by default by Microsoft.NET.Sdk.Web
samples/MvcSandbox/MvcSandbox.csproj
Outdated
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="1.0.0-msbuild3-final" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use version 1.0.1-* (latest on dev feed)
<VersionPrefix>1.2.0</VersionPrefix> | ||
<TargetFrameworks>net451;netstandard1.6</TargetFrameworks> | ||
<NoWarn>$(NoWarn);CS1591</NoWarn> | ||
<WarningsAsErrors>true</WarningsAsErrors> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: this is now TreatWarningsAsErrors
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-*" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: sort alphabetically
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' "> | ||
<PackageReference Include="System.Diagnostics.TraceSource" Version="4.4.0-*" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package isn't actually required. cc @pranavkm I'm not sure why we added it to all of our test projects, but I've been removing this.
@@ -16,7 +16,7 @@ private static void DomainFunc() | |||
accessor.ActionContext = new ActionContext(); | |||
} | |||
|
|||
[Fact] | |||
[Fact(Skip = "https://github.com/Microsoft/vstest/issues/419")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try the AppDomainSetup.ApplicationBase workaround I mentioned in microsoft/vstest#419
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea where that guy lives in coreclr world?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The equivalent in .net core is System.AppContext.BaseDirectory
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' "> | ||
<PackageReference Include="System.Diagnostics.TraceSource" Version="4.4.0-*" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, probably not required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Poking around to find out where it is required. Some of our tests do need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more things:
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Remove="TestFiles\**" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider instead setting <DefaultItemExcludes>$(DefaultItemExcludes);TestFiles\**</DefaultItemExcludes>
@@ -0,0 +1,25 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, .notest was a simple workaround. When we get repo.targets, we can control the test projects better.
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.2.0-*" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' "> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the references in this itemgroup are made redundant by the reference to NETStandard.Library.
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Content Update="Areas\Area1\Views\**\*;Views\**\*;web.config;wwwroot\**\*"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed. Microsoft.NET.Sdk.Web should pick these up.
🆙 📅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried running / debugging the test/WebSites
from VS or the command line? I'd guess many of the views now work only when invoked from the functional tests due to the odd <Content>
requirements in the new world.
Further, if .cshtml edits aren't picked up on browser refresh, will slow future development down.
samples/MvcSandbox/MvcSandbox.csproj
Outdated
<PropertyGroup> | ||
<TargetFrameworks>net451;netcoreapp1.1</TargetFrameworks> | ||
<RuntimeIdentifier Condition=" '$(TargetFramework)' != 'netcoreapp1.1' ">win7-x64</RuntimeIdentifier> | ||
<PreserveCompilationContext>true</PreserveCompilationContext> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need to set $(PreserveCompilationContext)
when using Microsoft.NET.Sdk.Web. Applies a lot in this PR.
[InlineData("POST")] | ||
public async Task ApiExplorer_HttpMethod_Single(string httpMethod) | ||
[Fact] | ||
public async Task ApiExplorer_HttpMethod_Single_PUT() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get why the GET method needs to be renamed. But, can't this still be a [Theory]
for POST and PUT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rynowak has convinced me that theories are evil 😄
@@ -0,0 +1,53 @@ | |||
TpTrace Verbose: 0 : 13980, 1, 2017/02/02, 12:42:31.591, 218211137537, vstest.console.dll, TestPluginCache: Discovering the extensions using extension path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these two testOutput files? Why do they need to be checked in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol, nope, total fail on my part. will remove.
@@ -0,0 +1,3 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please stick a comment somewhere explaining why two test projects can't use shadow copying.
"microsoft.aspnetcore.mvc.webapicompatshim", | ||
"microsoft.aspnetcore.mvc.testcommon", | ||
"microsoft.aspnetcore.mvc.core.test", | ||
"microsoft.aspnetcore.mvc.testdiagnosticlistener.sources", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
microsoft.aspnetcore.mvc.testdiagnosticlistener.sources.dll should never exist.
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="..\..\shared\Microsoft.AspNetCore.Mvc.TestDiagnosticListener.Sources\**\*.cs" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need the **\
part of this path. Same for a few other references to these shared sources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dougbu why not? Because there aren't any subfolders there right now, or because it's genuinely not required? If it just happens to work right now because there aren't sub-folders, we definitely need to keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆗 @Eilon. As you thought, my comment was about the current state. I also didn't think we'd be likely to add files at all -- let alone in sub-folders.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dougbu yeah unfortunately we never know, so better safe than sorry. If there are other places where we aren't doing this, we should fix those to use a recursive glob pattern.
<PropertyGroup> | ||
<TargetFrameworks>netcoreapp1.1;</TargetFrameworks> | ||
<DefineConstants>$(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES;FUNCTIONAL_TESTS</DefineConstants> | ||
<PackageTargetFallback>$(PackageTargetFallback);portable-net451+win8</PackageTargetFallback> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may have missed discussion earlier in this PR; sorry if so. Why are we no longer running the functional tests with .NET 4.5.1?
Separately, I assume the $(PackageTargetFallback)
setting is much like an "imports" value in project.json file. That did exist in this project. But, do we still need this setting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dougbu cuz it ain't supported! .NET Core only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plus, in the case of this PR, the tests don't work for external reasons, so we can't run them 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I asked because I wasn't aware of the specific external issues breaking these tests with desktop .NET.
afd02a5
to
40f72d4
Compare
@@ -0,0 +1,26 @@ | |||
<Project Sdk="Microsoft.NET.Sdk.Web"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this site work when started from the command line? I suspect you need a <Content Update...>
because the Web SDK only sets $(CopyToPublishDirectory)
for content it matches, not $(CopyToOutputDirectory)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works, no worries 😄
- Allow >= RC3 CLI's to build and run MVC. - Added extra sln's so they could be opened in VS. Currently VS' project system can't currently handle Mvc.sln. - Worked around several dotnet migration issues. They are listed in the re-attempted migration section here: #5482 - One large feature bit that couldn't be worked around was the functional tests running on desktop; it represented several known vstest issues. Removed desktop running of functional tests. - Skipped an ActionContextAccessor test due to a vstest appdomain problem.
86781c4
to
d3cce19
Compare
@NTaylorMullen just updated KoreBuild to build solutions instead of individual csproj. This is the only solution that has multiple *.sln files, so you'll need to add the following to a file named "build/repo.targets" <Project>
<ItemGroup>
<Solutions Include="$(MSBuildThisFileDirectory)..\Mvc.sln" />
</ItemGroup>
</Project> |
Any progress on this? It's the last repo on project.json. |
Still waiting on VS folks to give us a build of VS that doesn't deadlock/hang repeatedly when opening the solution. |
I'll push this work forward (well, hopefully forward) while @NTaylorMullen is OOF. Will do this in a new branch temporarily. Once things stabilize, I'll push new commits here to maintain the threads above. |
For now at least, please direct all comments to #5852. |
Can we just close this one? |
I'm leaving that up to @NTaylorMullen |
Closing in favor of #5852 |
Note: You cannot use the Test Explorer in VS for this migration pass. Working with VS folks to figure that out. Wont merge until that's resolved.