MingHong Zheng
MingHong Zheng

Reputation: 185

Build&Release Error CS0234: The type or namespace name 'Security' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

When I commit a project to vsts to do Build Automation

it's have a error

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

but my project it's can work on local with vs

have anyone know how to fix this error?

Upvotes: 2

Views: 3680

Answers (3)

Vangi
Vangi

Reputation: 724

In my case I forgot to add packages.config file to the source control.

Upvotes: 1

Dom84
Dom84

Reputation: 864

Your build can't find a referenced Assembly. This could be because of missing the nuget restore build step (look at the other answer here) or because of some missing entry in your repository of this particular build.

Upvotes: 1

starian chen-MSFT
starian chen-MSFT

Reputation: 33698

Add NuGet Restore task to your build/release definition.

  1. Change version to 0.*
  2. Path to solution or packages.config: ***.sln
  3. Select Restore for Installation type

Upvotes: 3

Related Questions