Vlad274
Vlad274

Reputation: 6844

Build works, but precompile during publish fails

There are no issues when:

Publish settings: Example settings

Additional information:

Error:

The type or namespace name 'Owin' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

File:

Properties\AssemblyInfo.cs

Relevant code from AssemblyInfo.cs

using Microsoft.Owin;
....
[assembly: OwinStartup(typeof(MyNameSpace.MyProject.Startup))]

Development Environment:

Upvotes: 1

Views: 799

Answers (1)

Vlad274
Vlad274

Reputation: 6844

For whatever reason, the proper references are not present during the publish process (I'd love to know why, but I'm unable to figure it out).

To fix this, simply move the Owin code into a new file AssemblyInfo.Owin.cs

using Microsoft.Owin;

[assembly: OwinStartup(typeof(MyNameSpace.MyProject.Startup))]

Upvotes: 1

Related Questions