-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use alternative way to generate assemblyinfo.cs (#1387)
* use alternative way to generate assemblyinfo.cs * disable generate assemblyinfo by dotnet * forgot await * Update powershell/generators/csproj.ts * check if assemblyinfopath --------- Co-authored-by: Yeming Liu <[email protected]>
- Loading branch information
Showing
4 changed files
with
36 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import { Project } from '../internal/project'; | ||
|
||
export async function generateAssemblyInfo(project: Project) { | ||
if (!project.azure || !project.assemblyInfoPath) { | ||
return; | ||
} | ||
|
||
const info = `${project.csharpCommentHeaderForCsharp} | ||
using System; | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
[assembly: System.Reflection.AssemblyCompanyAttribute("${project.assemblyCompany}")] | ||
[assembly: System.Reflection.AssemblyCopyrightAttribute("${project.assemblyCopyright}")] | ||
[assembly: System.Reflection.AssemblyProductAttribute("${project.assemblyProduct}")] | ||
[assembly: System.Reflection.AssemblyTitleAttribute("${project.assemblyProduct} - ${project.title}")] | ||
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0.0")] | ||
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0.0")] | ||
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] | ||
[assembly: System.CLSCompliantAttribute(false)]`; | ||
|
||
project.state.writeFile(project.assemblyInfoPath, info, undefined, 'source-file-csharp'); | ||
} |
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