Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GenerateAssemblyInfo target is ordered after _SetEmbeddedFilesFromSourceControlManagerUntrackedFiles target #572

Open
tmat opened this issue Feb 7, 2020 · 3 comments
Labels

Comments

@tmat
Copy link
Member

tmat commented Feb 7, 2020

AssemblyInfo.cs is not embedded when EmbedUntrackedSources is true.

The workaround is to specify it manually in Directory.Build.targets file. The following also includes workaround for dotnet/msbuild#1479:

<Project>
  <PropertyGroup>
    <TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
  </PropertyGroup>
  <ItemGroup>
    <EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
  </ItemGroup>
</Project>
@tmat tmat changed the title GenerateAssemblyInfo target is ordered after _SetEmbeddedFilesFromSourceControlManagerUntrackedFiles target: GenerateAssemblyInfo target is ordered after _SetEmbeddedFilesFromSourceControlManagerUntrackedFiles target Feb 7, 2020
@tmat tmat added the external label Feb 7, 2020
@tmat
Copy link
Member Author

tmat commented Feb 7, 2020

Should be fixed by dotnet/sdk#10613.
TODO: Add integration tests once we update to the SDK that has the fix.

ltrzesniewski added a commit to ltrzesniewski/InlineIL.Fody that referenced this issue Mar 29, 2020
sunahe pushed a commit to sunahe/SLTest2 that referenced this issue Mar 31, 2020
eerhardt added a commit to eerhardt/arrow that referenced this issue Apr 25, 2020
….AssemblyInfo.cs

Workaround dotnet/sourcelink#572 by explicitly embedding the AssemblyAttributes file into the pdb.
kou added a commit to apache/arrow that referenced this issue Apr 25, 2020
…AssemblyInfo.cs

Workaround dotnet/sourcelink#572 by explicitly embedding the AssemblyAttributes file into the pdb.

Closes #7040 from eerhardt/FixSourceLinkTest

Lead-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
akunzai added a commit to akunzai/GSS.DependencyInjection.AspNet that referenced this issue May 12, 2020
akunzai added a commit to akunzai/GSS.Authentication.CAS that referenced this issue May 12, 2020
akunzai added a commit to akunzai/GSS.Authentication.CAS that referenced this issue May 12, 2020
kszucs pushed a commit to kszucs/arrow that referenced this issue May 14, 2020
…AssemblyInfo.cs

Workaround dotnet/sourcelink#572 by explicitly embedding the AssemblyAttributes file into the pdb.

Closes apache#7040 from eerhardt/FixSourceLinkTest

Lead-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
kszucs pushed a commit to kszucs/arrow that referenced this issue May 14, 2020
…AssemblyInfo.cs

Workaround dotnet/sourcelink#572 by explicitly embedding the AssemblyAttributes file into the pdb.

Closes apache#7040 from eerhardt/FixSourceLinkTest

Lead-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
unaizorrilla added a commit to Xabaril/Esquio that referenced this issue May 15, 2020
0xced added a commit to 0xced/DockerRunner that referenced this issue May 26, 2020
eduherminio added a commit to eduherminio/SheepTools that referenced this issue Jun 2, 2020
* Run CI with very branch push.
* Build only once, generating package in CI (with version `0.0.0-ci-$(Build.BuildNumber)` for now).
This requires applying a workaround for Coverlet, to able to collect code coverage when the solution is built with `ContinuousIntegrationBuild=true` (see [this](dotnet/sourcelink#572) and [this](https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/DeterministicBuild.md).
* Fix custom task conditions: `succeeded()` behavior only applies by default when `condition` is not overriden.
* Add publish package guard (`Push != ''`) and options to avoid commiting new version and tag (`NoCommit`) and pushing packages to GitHub (`NoGitHubPush`) and NuGet (`NoNuGetPush`).
* Bump `SourceLink` and `Coverlet` and `dotnet-version-cli` versions.
eduherminio added a commit to eduherminio/FileParser that referenced this issue Jun 2, 2020
* Run CI with very branch push.
* Build only once, generating package in CI (with version `0.0.0-ci-$(Build.BuildNumber)` for now).
This requires applying a workaround for Coverlet, to able to collect code coverage when the solution is built with `ContinuousIntegrationBuild=true` (see [this](dotnet/sourcelink#572) and [this](https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/DeterministicBuild.md).
* Fix custom task conditions: `succeeded()` behavior only applies by default when `condition` is not overriden.
* Add publish package guard (`Push != ''`) and options to avoid commiting new version and tag (`NoCommit`) and pushing packages to GitHub (`NoGitHubPush`) and NuGet (`NoNuGetPush`).
* Use `dotnet-version-cli` rather than custom target to update versions.
* Remove custom targets and legacy, manual-publish ones.
* Remove NuGet test project
wazzamatazz added a commit to intelligentplant/AppStoreConnect.Adapters that referenced this issue Jun 24, 2020
wazzamatazz added a commit to wazzamatazz/csharp-repo-template that referenced this issue Jun 24, 2020
wazzamatazz added a commit to intelligentplant/csharp-repo-template that referenced this issue Jun 24, 2020
wazzamatazz added a commit to intelligentplant/IndustrialAppStore.ClientTools.DotNet that referenced this issue Jun 24, 2020
alamb pushed a commit to apache/arrow-rs that referenced this issue Apr 20, 2021
…AssemblyInfo.cs

Workaround dotnet/sourcelink#572 by explicitly embedding the AssemblyAttributes file into the pdb.

Closes #7040 from eerhardt/FixSourceLinkTest

Lead-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
mariomastrodicasa added a commit to mariomastrodicasa/JCOReflector that referenced this issue Oct 16, 2021
mariomastrodicasa added a commit to mariomastrodicasa/CLIParser that referenced this issue Oct 16, 2021
mariomastrodicasa added a commit to masesgroup/JCOReflector that referenced this issue Oct 18, 2021
* Updates generation of nuget packages with the fix available on dotnet/sourcelink#572

* #56: fixed missing exception reporting
mariomastrodicasa added a commit to masesgroup/CLIParser that referenced this issue Oct 28, 2021
* Update nuget package generation with fix available on dotnet/sourcelink#572

* #10: added UnparsedArgs property

* #2: added management of arguments cross check

* Reverted back launchSettings.json after test of #2

* Capture all exceptions until tests are managed from workflow (#2 tests)
@LordMike
Copy link

AssemblyInfo.cs is not embedded when EmbedUntrackedSources is true.

The workaround is to specify it manually in Directory.Build.targets file. The following also includes workaround for dotnet/msbuild#1479:

In case nobody thought of it, you can also force ordering of other targets by making a new target that comes before/after others - thus forcing one target to be evaluated before your new target, and another one after this new one. For this workaround:

<Target Name="temp" BeforeTargets="BeforeCompile" AfterTargets="GenerateAssemblyInfo"></Target>

@giggio
Copy link

giggio commented Feb 22, 2022

I was getting errors for other two files, I had to add 2 more lines to EmbeddedFiles. I don't know if this is a new issue in NuGet or .NET 6, but I hope it helps someone.

<Project>
    <PropertyGroup>
        <TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
    </PropertyGroup>
    <ItemGroup>
        <EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
        <EmbeddedFiles Include="$(GeneratedGlobalUsingsFile)"/>
        <EmbeddedFiles Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>
    </ItemGroup>
</Project>

Sergio1192 added a commit to Xabaril/Acheve.TestHost that referenced this issue Mar 17, 2022
…ory.Build.props"

Add Source Link to Github
Minimun version 3.1.300 to avoid issue "dotnet/sourcelink#572"
Sergio1192 added a commit to Xabaril/Acheve.TestHost that referenced this issue Mar 17, 2022
* Include Request with FromHeaderAttribute #32

* * added logic of apicontroller where the [frombody] attribute does not need to be added and fixed bug when i send a object with properties a null in the body

* * Update support for method patch

* Fix null reference exception when pass null properties in request model

* Simplify way of parameter extract

* Create a new model in Sample.Api to use it as a parameter
Two new endpoints with parameters (custom or primitive object)
Tests calling endpoints with a null parameter (custom or primitive object)
We check if the instance is null before AddTokken in PrimitiveParameterActionTokenizer and ComplexParameterActionTokenizer
We add null argument in TestServerAction instead of a null reference exception

* Bump Microsoft.AspNetCore.Authentication.JwtBearer

Bumps [Microsoft.AspNetCore.Authentication.JwtBearer](https://github.com/aspnet/AspNetCore) from 3.0.0 to 3.1.18.
- [Release notes](https://github.com/aspnet/AspNetCore/releases)
- [Commits](dotnet/aspnetcore@v3.0.0...v3.1.18)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Authentication.JwtBearer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update TestServerExtensionsTests.cs

fix test name

* Revert updated Microsoft.AspNetCore.Authentication.JwtBearer

* ?. removed in last merge

* * added tests

* Include dependencies.props in "Solution Items" folder
Update nugets and sdk version

* 42 use GitHub actions instead of appveyor (#45)

* Add github workflows

* remove appveyor files

Co-authored-by: Sergio <sergio.merino@plainconcepts.com>

* Move "Package information" from "build/dependencies.props" to "Directory.Build.props"
Add Source Link to Github
Minimun version 3.1.300 to avoid issue "dotnet/sourcelink#572"

Co-authored-by: Vicente Fernández Antolín <fernandez.antolin.vicente@gmail.com>
Co-authored-by: David Jiménez <david.jimenez@altia.es>
Co-authored-by: Carlos Jiménez Delgado <mail@carlosjdelgado.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergio <sergio.merino@plainconcepts.com>
Co-authored-by: David Jiménez Hernández <david.jimenez@ezentis.com>
Sergio1192 added a commit to Xabaril/Acheve.TestHost that referenced this issue Apr 19, 2022
* Include Request with FromHeaderAttribute #32

* * added logic of apicontroller where the [frombody] attribute does not need to be added and fixed bug when i send a object with properties a null in the body

* * Update support for method patch

* Fix null reference exception when pass null properties in request model

* Simplify way of parameter extract

* Create a new model in Sample.Api to use it as a parameter
Two new endpoints with parameters (custom or primitive object)
Tests calling endpoints with a null parameter (custom or primitive object)
We check if the instance is null before AddTokken in PrimitiveParameterActionTokenizer and ComplexParameterActionTokenizer
We add null argument in TestServerAction instead of a null reference exception

* Bump Microsoft.AspNetCore.Authentication.JwtBearer

Bumps [Microsoft.AspNetCore.Authentication.JwtBearer](https://github.com/aspnet/AspNetCore) from 3.0.0 to 3.1.18.
- [Release notes](https://github.com/aspnet/AspNetCore/releases)
- [Commits](dotnet/aspnetcore@v3.0.0...v3.1.18)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Authentication.JwtBearer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update TestServerExtensionsTests.cs

fix test name

* Revert updated Microsoft.AspNetCore.Authentication.JwtBearer

* ?. removed in last merge

* * added tests

* Include dependencies.props in "Solution Items" folder
Update nugets and sdk version

* 42 use GitHub actions instead of appveyor (#45)

* Add github workflows

* remove appveyor files

Co-authored-by: Sergio <sergio.merino@plainconcepts.com>

* Move "Package information" from "build/dependencies.props" to "Directory.Build.props"
Add Source Link to Github
Minimun version 3.1.300 to avoid issue "dotnet/sourcelink#572"

* Feature/router paramas with underscores (#51)

* allow router params with _ and -

* Test for allow router params with _

Co-authored-by: Alexis Martin Peña <alexis.martin@barrabes.biz>

* Fix TestServerAction for methods parameters (#43)

* Fix TestServerAction for methods parameters

* Merge With VFA91 Fork

* Add Guid[] In QueryParams

* Avoid add parameter when Guid[] is empty

* Adding Test

* using GuidArrayExtension

* Remove unused method

* fix for .net5

* Fixing comments

* Enable any array from query params

* Avoid Array with not primitives types

* fix for .net 3.1

* comments fix

* Change namespace & Clear function for primitives

* remove dynamic

* rename variables

Co-authored-by: Alexis Martin Peña <alexis.martin@barrabes.biz>
Co-authored-by: Sergio <sergio11_92@hotmail.com>

* Set targets and versions to Net Core 3.1, Net 5 and Net 6

Application version 3.2.0 (#54)
Set targets and versions to Net Core 3.1, Net 5 and Net 6
Add Directory.Build.targets with version of nugets
Modify workflows to support Net 5 and Net 6
Clean ".csproj"s

* Feature/update to net6 (#55)

Change PackageLicenseUrl to PackageLicenseUrl
Remove SetCompatibilityVersion from the code
Update README

* Feature/nullable query params (#53)

* Add Test For try fix a Bug

* Allo Query Parameter Nullable

* allow .net 3.1 build

* add folder again

* fix indent

* fix indent

* indent

* indent

* fix merge

* Change class name and access

* Pr Comments

* better comment method

* comment

* improve performance

Co-authored-by: Alexis Martin Peña <alexis.martin@barrabes.biz>

* Tests using WebApplicationFactory (#58)

Documentation about GetStarted, WebApplicationFactory and ICollectionFixture (xunit)
Refactor ValuesTests and ValuesWithHttpClientTests to test also WebApplicationFactory

Co-authored-by: Sergio <sergio.merino@plainconcepts.com>

* Allow router params in post methods (#60)

Co-authored-by: Alexis Martin Peña <alexis.martin@barrabes.biz>

* regex_pattern include several colon (#61)

Co-authored-by: Sergio <sergio.merino@plainconcepts.com>

Co-authored-by: Vicente Fernández Antolín <fernandez.antolin.vicente@gmail.com>
Co-authored-by: David Jiménez <david.jimenez@altia.es>
Co-authored-by: Carlos Jiménez Delgado <mail@carlosjdelgado.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Jiménez Hernández <david.jimenez@ezentis.com>
Co-authored-by: serweck <serweck@gmail.com>
Co-authored-by: Alexis Martin Peña <alexis.martin@barrabes.biz>
Sergio1192 added a commit to Xabaril/Acheve.TestHost that referenced this issue Jun 7, 2022
* Include Request with FromHeaderAttribute #32

* * added logic of apicontroller where the [frombody] attribute does not need to be added and fixed bug when i send a object with properties a null in the body

* * Update support for method patch

* Fix null reference exception when pass null properties in request model

* Simplify way of parameter extract

* Create a new model in Sample.Api to use it as a parameter
Two new endpoints with parameters (custom or primitive object)
Tests calling endpoints with a null parameter (custom or primitive object)
We check if the instance is null before AddTokken in PrimitiveParameterActionTokenizer and ComplexParameterActionTokenizer
We add null argument in TestServerAction instead of a null reference exception

* Bump Microsoft.AspNetCore.Authentication.JwtBearer

Bumps [Microsoft.AspNetCore.Authentication.JwtBearer](https://github.com/aspnet/AspNetCore) from 3.0.0 to 3.1.18.
- [Release notes](https://github.com/aspnet/AspNetCore/releases)
- [Commits](dotnet/aspnetcore@v3.0.0...v3.1.18)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Authentication.JwtBearer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update TestServerExtensionsTests.cs

fix test name

* Revert updated Microsoft.AspNetCore.Authentication.JwtBearer

* ?. removed in last merge

* * added tests

* Include dependencies.props in "Solution Items" folder
Update nugets and sdk version

* 42 use GitHub actions instead of appveyor (#45)

* Add github workflows

* remove appveyor files

Co-authored-by: Sergio <sergio.merino@plainconcepts.com>

* Move "Package information" from "build/dependencies.props" to "Directory.Build.props"
Add Source Link to Github
Minimun version 3.1.300 to avoid issue "dotnet/sourcelink#572"

* Feature/router paramas with underscores (#51)

* allow router params with _ and -

* Test for allow router params with _

Co-authored-by: Alexis Martin Peña <alexis.martin@barrabes.biz>

* Fix TestServerAction for methods parameters (#43)

* Fix TestServerAction for methods parameters

* Merge With VFA91 Fork

* Add Guid[] In QueryParams

* Avoid add parameter when Guid[] is empty

* Adding Test

* using GuidArrayExtension

* Remove unused method

* fix for .net5

* Fixing comments

* Enable any array from query params

* Avoid Array with not primitives types

* fix for .net 3.1

* comments fix

* Change namespace & Clear function for primitives

* remove dynamic

* rename variables

Co-authored-by: Alexis Martin Peña <alexis.martin@barrabes.biz>
Co-authored-by: Sergio <sergio11_92@hotmail.com>

* Set targets and versions to Net Core 3.1, Net 5 and Net 6

Application version 3.2.0 (#54)
Set targets and versions to Net Core 3.1, Net 5 and Net 6
Add Directory.Build.targets with version of nugets
Modify workflows to support Net 5 and Net 6
Clean ".csproj"s

* Feature/update to net6 (#55)

Change PackageLicenseUrl to PackageLicenseUrl
Remove SetCompatibilityVersion from the code
Update README

* Feature/nullable query params (#53)

* Add Test For try fix a Bug

* Allo Query Parameter Nullable

* allow .net 3.1 build

* add folder again

* fix indent

* fix indent

* indent

* indent

* fix merge

* Change class name and access

* Pr Comments

* better comment method

* comment

* improve performance

Co-authored-by: Alexis Martin Peña <alexis.martin@barrabes.biz>

* Tests using WebApplicationFactory (#58)

Documentation about GetStarted, WebApplicationFactory and ICollectionFixture (xunit)
Refactor ValuesTests and ValuesWithHttpClientTests to test also WebApplicationFactory

Co-authored-by: Sergio <sergio.merino@plainconcepts.com>

* Allow router params in post methods (#60)

Co-authored-by: Alexis Martin Peña <alexis.martin@barrabes.biz>

* regex_pattern include several colon (#61)

Co-authored-by: Sergio <sergio.merino@plainconcepts.com>

* Bug filtro isPrimitive y rutas con parametros strings (#64)

* * bug en el filtro isPrimitive

* * revert cambio para pasarlo a una rama

* * Corrección Bug en el filtro isPrimitive

* * Corrección bug isPrimitive
* Corrección bug endpoint con parametro string en la ruta

Co-authored-by: David Jiménez Hernández <david.jimenez@ezentis.com>

* AddQueryParameter extension in RequestBuilder (#65)

* feat(RequestBuilder): AddQueryParameter extension in RequestBuilder and their tests

* EscapeDataString the name and value

* Remove repeated tests

* Version 3.3.0 (#66)

* Add new sections in the doc: "About adding extra query parameters" and "Improving assertions in API responses" (#68)

* Change to central package management (#67)

* Change Directory.Build.targets to Directory.Packages.props
Minimun sdk version 6.0.300

* REmove PrivateAssets and IncludeAssets from Directory.Packages.props

* Update workflows

* Remove build\dependencies.props
Remove version in Microsoft.SourceLink.GitHub
Remove dependencies.props and move the content to Directory.Build.props and Directory.Packages.props
Add removed Microsoft.AspNetCore.Mvc.Testing nuget package to Sample.IntegrationTests.csproj

* PrivateAssets and IncludeAssets to xunit.runner.visualstudio

* tabs to spaces
Add PrivateAssets and IncludeAssets to coverlet.collector

* Update packages

* Refactor Directory.Packages.props to only repeat NetCoreVersion each .Net version

Co-authored-by: Vicente Fernández Antolín <fernandez.antolin.vicente@gmail.com>
Co-authored-by: David Jiménez <david.jimenez@altia.es>
Co-authored-by: Carlos Jiménez Delgado <mail@carlosjdelgado.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Jiménez Hernández <david.jimenez@ezentis.com>
Co-authored-by: serweck <serweck@gmail.com>
Co-authored-by: Alexis Martin Peña <alexis.martin@barrabes.biz>
Co-authored-by: David Jiménez Hernández <dadjh85@gmail.com>
Simply007 added a commit to kontent-ai/management-sdk-net that referenced this issue Jul 21, 2022
davedawkins added a commit to davedawkins/Sutil.Toastr that referenced this issue Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants