Use the NetStandardImplicitPackageVersion property when you want to specify a framework version that's lower than the metapackage version. The project file in the following example targets netstandard1.3 but uses the 1.6.0 version of NETStandard.Library.
Descargar archivo https://vlyyg.com/2yOK81
The GeneratedAssemblyInfoFile property defines the relative or absolute path of the generated assembly info file. Defaults to a file named [project-name].AssemblyInfo.[csvb] in the $(IntermediateOutputPath) (usually the obj) directory.
You can specify properties such as PackageId, PackageVersion, PackageIcon, Title, and Description to describe the package that gets created from your project. For information about these and other properties, see pack target.
The ApiCompatPreserveUnnecessarySuppressions property specifies whether to preserve unnecessary suppressions when regenerating the suppression file. When an existing suppression file is regenerated, its content is read, deserialized into a set of suppressions, and then stored in a list. Some of the suppressions might no longer be necessary if the incompatibility has been fixed. When the suppressions are serialized back to disk, you can choose to keep all the existing (deserialized) expressions by setting this property to true.
The RoslynAssembliesPath property specifies the path to the directory that contains the Microsoft.CodeAnalysis assemblies you want to use. You only need to set this property if you want to test with a newer compiler than what's in the SDK.
The AppendTargetFrameworkToOutputPath property controls whether the target framework moniker (TFM) is appended to the output path (which is defined by OutputPath). The .NET SDK automatically appends the target framework and, if present, the runtime identifier to the output path. Setting AppendTargetFrameworkToOutputPath to false prevents the TFM from being appended to the output path. However, without the TFM in the output path, multiple build artifacts may overwrite each other.
The AppendRuntimeIdentifierToOutputPath property controls whether the runtime identifier (RID) is appended to the output path. The .NET SDK automatically appends the target framework and, if present, the runtime identifier to the output path. Setting AppendRuntimeIdentifierToOutputPath to false prevents the RID from being appended to the output path.
The CopyLocalLockFileAssemblies property is useful for plugin projects that have dependencies on other libraries. If you set this property to true, any NuGet package dependencies are copied to the output directory. That means you can use the output of dotnet build to run your plugin on any machine.
The ErrorOnDuplicatePublishOutputFiles property relates to whether the SDK generates error NETSDK1148 when MSBuild detects duplicate files in the publish output, but can't determine which files to remove. Set the ErrorOnDuplicatePublishOutputFiles property to false if you don't want the error to be generated.
Starting with the .NET 6 SDK, the [Appname].runtimesettings.dev.json file is no longer generated by default at compile time. If you still want this file to be generated, set the GenerateRuntimeConfigDevFile property to true.
The GenerateRuntimeConfigurationFiles property controls whether runtime configuration options are copied from the runtimeconfig.template.json file to the [appname].runtimeconfig.json file. For apps that require a runtimeconfig.json file, that is, those whose OutputType is Exe, this property defaults to true.
The GenerateSatelliteAssembliesForCore property controls whether satellite assemblies are generated using csc.exe or Al.exe (Assembly Linker) in .NET Framework projects. (.NET Core and .NET 5+ projects always use csc.exe to generate satellite assemblies.) For .NET Framework projects, satellite assemblies are created by al.exe, by default. By setting the GenerateSatelliteAssembliesForCore property to true, satellite assemblies are created by csc.exe instead. Using csc.exe can be advantageous in the following situations:
The IsPublishable property allows the Publish target to run. This property only affects processes that use .*proj files and the Publish target, such as the dotnet publish command. It does not affect publishing in Visual Studio, which uses the PublishOnly target. The default value is true.
The PreserveCompilationContext property allows a built or published application to compile more code at run time using the same settings that were used at build time. The assemblies referenced at build time will be copied into the ref subdirectory of the output directory. The names of the reference assemblies are stored in the application's .deps.json file along with the options passed to the compiler. You can retrieve this information using the DependencyContext.CompileLibraries and DependencyContext.CompilationOptions properties.
The PreserveCompilationReferences property is similar to the PreserveCompilationContext property, except that it only copies the referenced assemblies to the publish directory, and not the .deps.json file.
In .NET 5 and earlier versions, reference assemblies are always written to the OutDir directory. In .NET 6 and later versions, you can use the ProduceReferenceAssemblyInOutDir property to control whether reference assemblies are written to the OutDir directory. The default value is false, and reference assemblies are only written to the IntermediateOutputPath directory. Set the value to true to write reference assemblies to the OutDir directory.
This property is an enablement flag for several other properties that control whether various kinds of XML documentation files are copied to the publish directory by default, namely PublishDocumentationFile and PublishReferencesDocumentationFiles. If those properties are unset, and this property is set, then those properties will default to true. This property defaults to true.
This property was introduced in .NET 7. It's similar to the SelfContained property, except that it's specific to the publish verb. It's recommended to use PublishSelfContained instead of SelfContained.
The RuntimeIdentifiers property lets you specify a semicolon-delimited list of runtime identifiers (RIDs) for the project. Use this property if you need to publish for multiple runtimes. RuntimeIdentifiers is used at restore time to ensure the right assets are in the graph.
The SatelliteResourceLanguages property lets you specify which languages you want to preserve satellite resource assemblies for during build and publish. Many NuGet packages include localized resource satellite assemblies in the main package. For projects that reference these NuGet packages that don't require localized resources, the localized assemblies can unnecessarily inflate the build and publish output size. By adding the SatelliteResourceLanguages property to your project file, only localized assemblies for the languages you specify will be included in the build and publish output. For example, in the following project file, only English (US) and German (Germany) resource satellite assemblies will be retained.
The UseAppHost property controls whether or not a native executable is created for a deployment. A native executable is required for self-contained deployments. A framework-dependent executable is created by default. Set the UseAppHost property to false to disable generation of the executable.
Numerous MSBuild properties are available to fine tune trimming, which is a feature that trims unused code from self-contained deployments. These options are discussed in detail at Trimming options. The following table provides a quick reference.
The ContinuousIntegrationBuild property indicates whether a build is executing on a continuous integration (CI) server. When set to true, this property enables settings that only apply to official builds as opposed to local builds on a developer machine. For example, stored file paths are normalized for official builds. But on a local development machine, the debugger isn't able to find local source files if file paths are normalized.
When this property is set to true, all symbol files (also known as PDB files) from PackageReference items in the project are copied to the build output. These files can provide more informative stack traces for exceptions and make memory dumps and traces of the running application easier to understand. However, including these files results in an increased deployment bundle size.
When this property is set to true, all generated XML documentation files from PackageReference items in the project are copied to the build output. Note that enabling this feature will result in increased deployment bundle size.
The DisableImplicitFrameworkDefines property controls whether or not the SDK generates preprocessor symbols for the target framework and platform for the .NET project. When this property is set to false or is unset (which is the default value) preprocessor symbols are generated for:
Finally, if your target framework implies support for older target frameworks, preprocessor symbols for those older frameworks are emitted. For example, net6.0 implies support for net5.0 and so on all the way back to .netcoreapp1.0. So for each of these target frameworks, the Framework with version minimum bound symbol will be defined.
The DocumentationFile property lets you specify a file name for the XML file that contains the documentation for your library. For IntelliSense to function correctly with your documentation, the file name must be the same as the assembly name and must be in the same directory as the assembly. If you don't specify this property but you do set GenerateDocumentationFile to true, the name of the documentation file defaults to the name of your assembly but with an .xml file extension. For this reason, it's often easier to omit this property and use the GenerateDocumentationFile property instead.
If you specify this property but you set GenerateDocumentationFile to false, the compiler does not generate a documentation file. If you specify this property and omit the GenerateDocumentationFile property, the compiler does generate a documentation file.
d3342ee215