Repository navigation
Conversation
|
/cc @livarcocc for migration stuff. |
mairaw
left a comment
There was a problem hiding this comment.
It looks great, but I have some suggestions to help with the flow and also commented on some issues I found. Thanks!
| @@ -0,0 +1,57 @@ | |||
| --- | |||
There was a problem hiding this comment.
instead of being a folder inside preview3, I think it should go directly under core. Otherwise, we'll soon have to move this.
There was a problem hiding this comment.
so let's move it to core/migration
| @@ -0,0 +1,57 @@ | |||
| --- | |||
| title: .NET Core Application Deployment | Microsoft Docs | |||
| @@ -0,0 +1,192 @@ | |||
| --- | |||
There was a problem hiding this comment.
what happened to the old topic? should it be redirected to this one?
There was a problem hiding this comment.
so we need to apply the redirect metadata to the old one.
|
|
||
| This document will cover migration scenarios for .NET Core projects. It will cover the following three migration scenarios: | ||
|
|
||
| 1. Migration from a valid latest schema of `project.json` to `csproj` |
There was a problem hiding this comment.
nit: end punctuation to these sentences, style for file names is italic. I can fix these nits later
There was a problem hiding this comment.
Why is style for file names italic? Seems wrong...
|
|
||
| [!INCLUDE[preview-warning](../../../includes/warning.md)] | ||
|
|
||
| This document will cover migration scenarios for .NET Core projects. It will cover the following three migration scenarios: |
There was a problem hiding this comment.
This sentence is a bit repetitive. Can we shorten it a bit?
Suggestion:
"This document will cover the following migration scenarios for .NET Core projects:"
| `[project]` | ||
| `<project>` | ||
|
|
||
| The project to publish, which defaults to the current directory if `[project]` is not specified. |
| [--project] [[--] [application arguments]]` | ||
| ``` | ||
| dotnet run <project> | ||
| dotnet run [-f|--framework] [-c|--configuration] |
There was a problem hiding this comment.
same feedback as per the other commands syntaxes
| This command relies on [dotnet build](dotnet-build.md) to build source inputs to a .NET assembly, before launching the program. | ||
| The requirements for this command and the handling of source inputs are all inherited from the build command. | ||
| The documentation for the build command provides more information on those requirements. | ||
| Output files are written out into the default location which is `bin/<configuration>/<target>`. For example, if you have a `netcoreapp1.0` application and you run `dotnet run`, the output will be placed in `bin/Debug/netcoreapp1.0`. Files are owverwritten as needed. Temporary files are placed in the `obj` directory. |
| Temporary files are written to the child *obj* folder. | ||
|
|
||
| In case of a project with multiple specified frameworks, `dotnet run` will first select the .NET Core frameworks. If those do not exist, it will error out. To specify other frameworks, use the `--framework` argument. | ||
| In case of a project with multiple specified frameworks, `dotnet run` will show an error unless `--framework` option is used to specify for which framework to run the application. |
There was a problem hiding this comment.
In case of a project with multiple specified frameworks -> When a project specifies multiple frameworks,
|
|
||
| For more information about the `dotnet` driver, see the [.NET Core Command Line Tools (CLI)](index.md) topic. | ||
|
|
||
| In order to run the application, the `dotnet run` command resolved the dependencies of the application that are outside of the shared runtime from the NuGet cache. Given this, it is not reccomended to use this command to run applications in production. Instead, you should [create a deployment](../deploying/index.md) using [`dotnet publish`](dotnet-publish.md) command and use that in production. |
There was a problem hiding this comment.
Suggestion:
Given this, it is not reccomended to use this command to run applications in production. ->
Because of this, dotnet run is only meant to be used at development time in your local machine and not in a production environment.
and use that -> and use that to deploy your app
|
|
||
| Visual Studio 2017 will migrate the project automatically when you open either the `xproj` file or the solution file which references `xproj` files. If a solution file is opened, Visual Studio 2017 will automatically migrate all of the projects that are specified in the solution. | ||
|
|
||
| In the command line scenario, you can use the `dotnet migrate` command. It will migrate a project, a solution or a set of folders in that order, depending on which ones were found. |
There was a problem hiding this comment.
Worth mentioning that when you migrate a project, it migrates that project and all its dependencies?
| In both migration modalities files that were migrated (project.json, global.json and xproj) will be moved to a `backup` folder (on Windows, the folder will be named `Backup`). The solution file that is migrated will be upgraded to Visual Studio 2017 and you won't be able to open that solution file in previous versions of Visual Studio. | ||
|
|
||
| > [!NOTE] | ||
| > If you are using VS Code, the `dotnet migrate` command will modify VS Code-specific files such as `tasks.json`. These files need to be changed manually. |
|
|
||
| * Remove the tools version property from the `<Project>` element, if it exists. | ||
| * Remove the XML namespace (`xmlns`) from the `<Project>` element. | ||
| * If it doesn't exist, add the `Sdk` attribute to the `<Project>` element and set it to the value of `Microsoft.NET.Sdk`. This attribute specifies that the project uses the Core SDK. |
| 2. Migration from DNX to a valid Preview 2 project.json. | ||
| 3. Migration from RC3 and previous .NET Core csproj projects to the final format . | ||
|
|
||
| ## Migration from project.json to csproj |
There was a problem hiding this comment.
You should mention global.json here somewhere. Basically, if you have one that points to an older version of the CLI, it might not contain the migrate command or it might point to an older version of the migrate command missing many features.
You should teach how to fix that to use the latest CLI. Either through pinning that or removing the sdk version completely (the whole global.json file).
There was a problem hiding this comment.
Yes, I was thinking about adding that here too. It'd fix this issue (#1543)
There was a problem hiding this comment.
I've added a Common issues section.
| 2. Migrating the project file (`project.json`) itself to the CLI tooling. | ||
| 3. Migrating off of any DNX APIs to their BCL counterparts. | ||
|
|
||
| ### Changing the global.json file |
There was a problem hiding this comment.
are you suggesting we add this to the main migration topic @livarcocc?
|
|
||
|
|
||
| ## Description | ||
| The `dotnet build` command builds the project and its dependencies into a set of binaries. The binaries are the symbol files used for debugging (having a `*.pdb` extension) as well as the project's code in Intermediate Language (IL) with a `*.dll` extension. Additionally, a JSON file that lists out the dependencies of the application with the `*.deps` extension will be produced. Finally, a `runtime.config.json` file will be produced as well. This file specifies which shared runtime and version the built code will run against. |
| ## Description | ||
| The `dotnet build` command builds the project and its dependencies into a set of binaries. The binaries are the symbol files used for debugging (having a `*.pdb` extension) as well as the project's code in Intermediate Language (IL) with a `*.dll` extension. Additionally, a JSON file that lists out the dependencies of the application with the `*.deps` extension will be produced. Finally, a `runtime.config.json` file will be produced as well. This file specifies which shared runtime and version the built code will run against. | ||
|
|
||
| If the project has third-party dependencies, such as libraries from NuGet, these will be resolved from the NuGet cache and will not be available with the project's built output. With that in mind, the product of `dotnet build` is not ready to be transferred to another machine to run. This is in contrast to the behavior of .NET Framework in which building an executable project (an application) will produce an output that is possible to run on any machine that has .NET Framework installed. In order to get a similar experience in .NET Core, you have to use the [dotnet publish](dotnet-publish.md) command. More information about this can be found in the [.NET Core Application Deployment](../deploying/index.md) document. |
There was a problem hiding this comment.
I would say that the third party dependencies will not be binplaced to the build output folder. They are still available, but they will be used out of the nuget cache.
There was a problem hiding this comment.
isn't what the sentence is basically saying?
| The `dotnet build` command builds multiple source file from a source project and its dependencies into a binary. | ||
| By default, the resulting binary is in Intermediate Language (IL) and has a DLL extension. | ||
| `dotnet build` also drops a `*.deps` file which outlines what the host needs to run the application. | ||
| Building requires the existence of an asset file (a file that lists all of the dependencies of your application), which means that you have to run [`dotnet restore`](dotnet-restore.md) prior to building the project. Lack of the assets file manifests as the inability of the tooling to resolve reference assemblies which will result in errors. |
|
I'll try to go over this PR tonight and if there are changes needed, I'll edit myself. |
|
|
||
| For more information about the `dotnet` driver, see the [.NET Core Command Line Tools (CLI)](index.md) topic. | ||
|
|
||
| In order to run the application, the `dotnet run` command resolved the dependencies of the application that are outside of the shared runtime from the NuGet cache. Given this, it is not reccomended to use this command to run applications in production. Instead, you should [create a deployment](../deploying/index.md) using [`dotnet publish`](dotnet-publish.md) command and use that in production. |
There was a problem hiding this comment.
should it say the dotnet run command resolves the dependencies...?
|
Ok, I've rebased and addressed most of the comments I believe. If you see any issues with my edits, please let me know and I'll make the changes tomorrow. But for now, I'll merge this as soon as the builds are green. |
This adds the migraiton document into a migration folder under the Preview 3 folder. The migration document covers the migration from project.json to csproj using the automated tools, points to the old DNX migration for those people that still use that and offers some advice on getting from pre-RC4 csproj to RC4 (and thus RTW) csproj formats. The change also adds some content to the dotnet build, dotnet run and dotnet publish documents to make sure that their differences are clearly outlined. Fixes #1512, #1509, #1515
* Updated publishing getting started * Converted project.json to MSBuild * Updated csproj files to default. * Revised VSCode topic for MSBuild-based projects * Tutorials revised for *.csproj projects (#1488) * Converted some project.json projects * Replaced csproj project file. * Updated publishing getting started * Converted project.json to MSBuild * Updated csproj files to default. * Revised VSCode topic for MSBuild-based projects * Tutorials revised for *.csproj projects (#1488) * Remove project-json.md (#1520) * remove doc * changed to redirect per feedback * updates, remove from toc * Updated library examples for csproj. * Revised xml doc comments topic for csproj * Addressed comments, fixed some other issues. * Converted samples to csproj. * Modified build-related information. * Addressed comments * Changed relative URLs to absolute * Changed links from github to docs * Update fsharp/tutorials/getting-started-command-line (#1521) * Updated publishing getting started * Converted project.json to MSBuild * Updated csproj files to default. * Revised VSCode topic for MSBuild-based projects * Tutorials revised for *.csproj projects (#1488) * fsharp update to 004769 * fixing -- * undoing -- * address feedback * addressed nits * remove global.json add dotnet sln * add directory output * add dash to command line in code. * fixing feedback * change ms.date * Update mstest tutorial for csproj (#1531) * Remove project-json.md (#1520) * remove doc * changed to redirect per feedback * updates, remove from toc * Update testingng with MSTest for csproj This topic now mirrors the unit testing with dotnet test and xunit. * update topic for multiple platforms This meant updating the index file, the TOC, and adding redirection due to the file name change. * Add the meta tag to redirect LiveFyre comments. * Update per feedback * Final review and proofread * Update per feedback on PR #1538 * respond to feedback. * fixed product name * Revised out parameter modifier for C# 7 * Corrected bad code example links. * Fixed one more broken link. * Fixed alert. * C# 7 revision of throw * Corrected code dropout in Lambda Expressions topic. * Fixed bad code snippet end tag * project migration from project.json to csproj * Revised for csproj migration * Replaced incorrect version of csproj file * Additional topic added * Samples ported to MSBuild * Fix typo * bringing changes back * Update pattern matching to fix a couple small issues (#1612) * Update pattern matching to fix a couple small issues 1. Update feature name for pattern matching (issue #1479) 2. Update description of match expressions to explain that match expressions in the wrong order generate a compiler error (Issue #1585) * fix build issues. Directory move because the solution directory isn’t needed. * missed one set of build errors. * update to the 1.1 meta package. * temporarily disable enable_incremental_build (#1643) * Addressed review comments * Incorporated review comments * removing test protocol doc (#1615) * uses raw version of sampleQuotes.txt in link (#1652) This makes it easier to `wget` the file. * dotnet new updates for MSBuild/csproj (#1649) * Update index.md * Update index.md * Update dependencies.md * Update index.md * Update dependencies.md * Update dotnet.md * Update index.md * Update dependencies.md * Update using-with-xplat-cli-msbuild-folders.md * Update getting-started-command-line.md * Update with-visual-studio-code.md * Update attributes.md * Update console-teleprompter.md * Update console-webapiclient.md * Update attributes.md * Update inheritance.md * Update string-interpolation.md * Update working-with-linq.md * Update working-with-linq.md * Update dotnet-migrate.md * Update using-with-xplat-cli-msbuild-folders.md * Update using-with-xplat-cli-msbuild-folders.md * Update dotnet-new.md * Update dotnet-add-package.md * Update dotnet-add-reference.md * Update dotnet-build.md * Update dotnet-add-reference.md * Update dotnet-add-package.md * Update dotnet-clean.md * Update dotnet-build.md * Update dotnet-clean.md * Update dotnet-install-script.md * Update dotnet-build.md * Update dotnet-build.md * Update dotnet-install-script.md * Update dotnet-list-reference.md * Update dotnet-msbuild.md * Update dotnet-new.md * Update dotnet-nuget-delete.md * Update dotnet-nuget-locals.md * Update dotnet-msbuild.md * dotnet command updates * Update broken xref * Update dotnet-pack.md * Update dotnet-publish.md * Update using-with-xplat-cli-msbuild-folders.md * Update with-visual-studio-code.md * 💥 removing preview3 folder (#1650) * test redirection with document id removing dotnet-new from preview3 * 💥 removing preview3 folder * removed warnings and RC4 mentions fixing build issues fixing more build issues * addressed feedback more fixes * rebase and fixes * fixes * cleanup * fix broken link * Migration and build, publish & run fixes (#1592) * Migration and build, publish & run fixes This adds the migraiton document into a migration folder under the Preview 3 folder. The migration document covers the migration from project.json to csproj using the automated tools, points to the old DNX migration for those people that still use that and offers some advice on getting from pre-RC4 csproj to RC4 (and thus RTW) csproj formats. The change also adds some content to the dotnet build, dotnet run and dotnet publish documents to make sure that their differences are clearly outlined. Fixes #1512, #1509, #1515 * Fixing broken links * Responding to PR feedback * Responding to PR feedback. * Resolving build breaks * Fixing build breaks...again. * some updates * fixed toc entry * addressed feedback + fixes * more fixes * few more fixes * removing preview3 links * Update getting started on macos (#1560) * update getting started for csproj build system. Updates all the application code, the text in the MD file, and the updated VS Code debugging settings. * Update for new VS code extension behavior. * respond to feedback. * remove version specific notes on the SDK. * Update the docker getting started topic. (#1503) * Update the docker getting started topic. * fix build errors And update Docker build instructions * update instructions to use dotnet add package * Update Unit Testing with XUnit (#1487) * Remove project-json.md (#1520) * remove doc * changed to redirect per feedback * updates, remove from toc * run dotnet migrate * build and run tests * move projects to the correct updated location * Update project files and code. * fix a file name. * mis-typed the region name. * proofread and update. This is ready for review and mergning. * update instructions to use the new CLI command. * use updated commands the older commands still work, but it’s better to standardize on the new names. * remove note about .NET Core 1.0 * update for correct xUnit branding. * small fixes (#1655) * Documented C# when keyword (#1647) * documented when keyword * Incorporated review comments * Switch statement revised for C# 7 (#1640) * Switch statement revised for C# 7 * Fixed bad links * Changed 'switch expression' to 'match expression' * Addressed review comments. * Added code snippet tags. * modified code * update dotnet-install script topic (#1618) * update dotnet-install script * fixed word dropout * Changes to dotnet new (#1637) * changes to dotnet new * removed current dir from the summary * a few more edits * fix two broken links. (#1657) * fix two broken links. * fix more bad links. * removing RC4 from the menu * more fixes
This adds the migraiton document into a migration folder under the
Preview 3 folder. The migration document covers the migration from
project.json to csproj using the automated tools, points to the old DNX
migration for those people that still use that and offers some advice on
getting from pre-RC4 csproj to RC4 (and thus RTW) csproj formats.
The change also adds some content to the dotnet build, dotnet run and
dotnet publish documents to make sure that their differences are clearly
outlined.
This fixes #1512, fixes #1509, fixes #1515 and fixes #1543