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

Auto generated AssemblyFile location causes issues with symbols #146

Closed
wasabii opened this issue Apr 24, 2014 · 5 comments · Fixed by #316
Closed

Auto generated AssemblyFile location causes issues with symbols #146

wasabii opened this issue Apr 24, 2014 · 5 comments · Fixed by #316
Milestone

Comments

@wasabii
Copy link

wasabii commented Apr 24, 2014

This is kind of a weird indirect issue, that takes some explanation.

When using GitFlowVersionTask in a project that gets packaged using NuGet into a symbols.nupkg file, and uploaded or pushed to a symbol server (such as SymbolSource.org), the GitFlowVersionTask causes an issue.

I get an error message like this:

Pushing NXKit 0.3.8 to the symbol server (http://nuget.gw.symbolsource.org/Public/NuGet)...
Failed to process request. 'Package submission failed: Source file c:\Users\jhaltom\AppData\Local\Temp\GitVersionTask\As
semblyInfo_NXKit_0as2qyub.0by.g.cs not found in package. Source file is declared in NXKit.pdb. . See http://www.symbolso
urce.org/Public/Home/Help for possible reasons. Fiddler may help diagnosing this error if your client discards attached
detailed information.'.

I suspect the issue is that the temporary file is generated in AppData\Local, instead of in obj/Release. I'm imagining the are parts of the MSBuild process which generate the .pdb file, but somehow excludes things.

Or something. I don't know. Either way, GitFlowVersionTask is the only thing causing this issue. If I remove it, everything else is fine, even the other autogenerated files in obj.

@JakeGinnivan
Copy link
Contributor

@SimonCropp got any ideas?

@wasabii
Copy link
Author

wasabii commented May 24, 2014

Oh, my guess as to the location of the file isn't the issue either. I changed the code to generate it in obj like everything else, and it still doesn't work.

@SimonCropp
Copy link
Contributor

@wasabii how is the source nuget package generated? where does it pull files from?

@asbjornu
Copy link
Member

I'm having this issue just now in SharpRaven, which uses GitVersionTask. If you have an account there, you can inspect the problem on CodeBetter's TeamCity Server.

Failed to process request. 'Package submission failed: Source file z:\Builds\temp\buildTmp\GitVersionTask\AssemblyInfo_SharpRaven_qykfqr43.dxp.g.cs not found in package. Source file is declared in SharpRaven.pdb. . See http://www.symbolsource.org/Public/Home/Help for possible reasons. Fiddler may help diagnosing this error if your client discards attached detailed information.'. 
The remote server returned an error: (506) Package submission failed: Source file z:\Builds\temp\buildTmp\GitVersionTask\AssemblyInfo_SharpRaven_qykfqr43.dxp.g.cs not found in package. Source file is declared in SharpRaven.pdb. . See http://www.symbolsource.org/Public/Home/Help for possible reasons. Fiddler may help diagnosing this error if your client discards attached detailed information...
Process exited with code 1

The NuGet package is generated with the following command:

NuGet command: C:\buildAgent\plugins\nuget-agent\bin\JetBrains.TeamCity.NuGetRunner.exe C:\buildAgent\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe pack Z:\Builds\work\5248a6272d928841\src\app\SharpRaven\SharpRaven.csproj -OutputDirectory Z:\Builds\work\5248a6272d928841\NuGet -BasePath Z:\Builds\work\5248a6272d928841\src\app\SharpRaven -Version 1.5.0-unstable0007 -Symbols -Properties "ReleaseNotes=Adds Timeout property to RavenClient. The NuGet package targets .NET 4.0 and 4.5 separately. A bug with the 'modules' property has been fixed."

And published to nuget.org with the following command:

NuGet command: C:\buildAgent\plugins\nuget-agent\bin\JetBrains.TeamCity.NuGetRunner.exe C:\buildAgent\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe push Z:\Builds\work\5248a6272d928841\NuGet\SharpRaven.1.5.0-unstable0007.nupkg %%teamcity_nuget_api_key_1415912337375%%

Perhaps AssemblyInfo_SharpRaven_qykfqr43.dxp.g.cs needs to be included in the .csproj? I haven't looked, but I expect that peaking into the generated SharpRaven.1.5.0-unstable0007.symbols.nupkg file would lead to me not finding the generated AssemblyInfo file.

@asbjornu
Copy link
Member

@SimonCropp @JakeGinnivan Instead of having GitVersionTask generate a new, randomly named file, can't it insert (and then, after compile, remove) the [Assembly*Version] attributes into the already existing AssemblyInfo.cs file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants