AzureServiceTokenProviderException not marked Serializable
See original GitHub issueI get an error when doing a full publish build of an ASP.Net MVC 5 application. It occurs during the step that compiles and merges views (aspnet_compiler.exe)
Error ASPRUNTIME: Type 'Microsoft.Azure.Services.AppAuthentication.AzureServiceTokenProviderException' in assembly 'Microsoft.Azure.Services.AppAuthentication, Version=1.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable.
Checking the code, it looks like Microsoft.Azure.Services.AppAuthentication.AzureServiceTokenProviderException
indeed is not marked as serializable. Other exception classes in other libraries have this clause at the top:
#if FullNetFx
[Serializable]
#endif
(ie, Microsoft.Rest.HttpOperationException)
Is this an oversight on the AzureServiceTokenProviderException class, or should I look elsewhere?
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (3 by maintainers)
Top GitHub Comments
It is serializable now but it still not working. Now exception message looks like that:
Try to unit test this functionality after fix it 😃
@dgliwa @dil-bpecor I’m having the same issue now
I have a aspnet project which builds fine locally, but on Azure DevOps I get this same exact error. We use our own build agent. I installed Visual studio on it and built and that’s fine. But when I use it with MSbuild.exe, I get the above error.
I don’t have /p:PrecompileBeforePublish parameter any where in our project. Even then I provided it /p:PrecompileBeforePublish=false, but it still doesn’t seem to work. Would you know perhaps any other reason?