Build fails but no errors? [closed] - c#
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a small project where I had to change a reference (dll) to a new version and when doing this and hitting build I get failed (80 errors)!? When visiting the cs files the errors disappear on their own until there are 0 left. While having the cs files open and hitting build again I still get failed but no 0 errors?
The types that it says is broken in the output is possible to follow with the F12 so they do exists!?
I have tried restart, clean, rebuild the new dll in both 32 and 64. No luck at all?
1>------ Rebuild All started: Project: PopManWS, Configuration:
Release Any CPU ------ 1>Build started 2016-09-12 19:01:49.
1>C:\Program Files
(x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5):
warning MSB3274: The primary reference "MyApp.ServiceExtensions" could
not be resolved because it was built against the
".NETFramework,Version=v4.6" framework. This is a higher version than
the currently targeted framework ".NETFramework,Version=v4.0".
1>GenerateTargetFrameworkMonikerAttribute: 1>Skipping target
"GenerateTargetFrameworkMonikerAttribute" because all output files are
up-to-date with respect to the input files. 1>CoreCompile: 1>
C:\Program Files (x86)\MSBuild\14.0\bin\csc.exe /noconfig
/nowarn:1701,1702,2008 /nostdlib+ /platform:AnyCPU /errorreport:prompt
/warn:4 /define:TRACE /errorendlocation /preferreduilang:en-US
/highentropyva- /reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.0\Microsoft.CSharp.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.0\mscorlib.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Configuration.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Core.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Data.DataSetExtensions.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Data.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.0\System.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Runtime.Serialization.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.0\System.ServiceModel.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Web.Extensions.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Xml.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Xml.Linq.dll"
/debug:pdbonly /filealign:512 /optimize+ /out:obj\Release\PopManWS.dll
/ruleset:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team
Tools\Static Analysis Tools\Rule
Sets\MinimumRecommendedRules.ruleset" /target:library /utf8output
MyAppPatient.cs Patient.cs PatientParser.cs Properties\AssemblyInfo.cs
"Service References\PopManService\Reference.cs" SokPatientHandler.cs
"C:\Users\kalle\AppData\Local\Temp.NETFramework,Version=v4.0.AssemblyAttributes.cs"
1> Using shared compilation with compiler from directory: C:\Program
Files (x86)\MSBuild\14.0\bin
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(5,7,5,12):
error CS0246: The type or namespace name 'MyApp' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(6,7,6,12):
error CS0246: The type or namespace name 'MyApp' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(3,7,3,12):
error CS0246: The type or namespace name 'MyApp' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\PatientParser.cs(7,7,7,12):
error CS0246: The type or namespace name 'MyApp' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\SokPatientHandler.cs(5,7,5,12):
error CS0246: The type or namespace name 'MyApp' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\SokPatientHandler.cs(10,7,10,12):
error CS0246: The type or namespace name 'MyApp' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(7,28,7,41):
error CS0246: The type or namespace name 'IMyAppPatient' could not be
found (are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\PatientParser.cs(18,16,18,29):
error CS0246: The type or namespace name 'IMyAppPatient' could not be
found (are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\PatientParser.cs(28,17,28,30):
error CS0246: The type or namespace name 'IMyAppPatient' could not be
found (are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(10,33,10,46):
error CS0246: The type or namespace name 'IMyAppPatient' could not be
found (are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(9,16,9,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(11,16,11,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(13,16,13,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(15,16,15,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(17,16,17,64):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(17,22,17,27):
error CS0246: The type or namespace name 'MyApp' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(19,16,19,32):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(21,16,21,32):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(12,16,12,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(23,16,23,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(14,16,14,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(25,16,25,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(16,16,16,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(18,16,18,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(27,16,27,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(29,16,29,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(20,16,20,64):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(20,22,20,27):
error CS0246: The type or namespace name 'MyApp' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(31,16,31,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(33,16,33,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(22,16,22,32):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(35,16,35,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(24,16,24,32):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(37,16,37,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(26,16,26,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(39,16,39,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(28,16,28,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(30,16,30,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(41,16,41,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(32,16,32,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(43,16,43,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(34,16,34,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\SokPatientHandler.cs(16,38,16,49):
error CS0246: The type or namespace name 'ISokPatient' could not be
found (are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(45,16,45,27):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(36,16,36,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(38,16,38,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(47,16,47,27):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(40,16,40,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(49,16,49,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(42,16,42,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(51,16,51,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(44,16,44,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\SokPatientHandler.cs(28,77,28,96):
error CS0246: The type or namespace name 'SearchPatientSource' could
not be found (are you missing a using directive or an assembly
reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\SokPatientHandler.cs(28,16,28,21):
error CS0246: The type or namespace name 'MyApp' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(53,16,53,27):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(46,16,46,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(48,16,48,27):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(55,16,55,32):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(50,16,50,27):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(57,16,57,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(52,16,52,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(54,16,54,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(59,16,59,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(56,16,56,27):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(61,16,61,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(58,16,58,32):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(63,16,63,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(60,16,60,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(65,16,65,27):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(62,16,62,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(67,16,67,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(64,16,64,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(66,16,66,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(68,16,68,27):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(69,16,69,35):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(70,16,70,29):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(71,16,71,31):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(72,16,72,35):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(74,16,74,31):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\Patient.cs(73,16,73,31):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?)
1>C:\MyApp\Produkter\Integrationer\PopManWS-Blekinge\PopManWS\MyAppPatient.cs(76,16,76,31):
error CS0246: The type or namespace name 'Value<>' could not be found
(are you missing a using directive or an assembly reference?) 1>
1>Build FAILED. 1> 1>Time Elapsed 00:00:00.05
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
The log output seems quite clear to me:
MyApp.ServiceExtensions" could not be resolved because it was built against the ".NETFramework,Version=v4.6" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
The project PopManWS that references MyApp.ServiceExtensions is build using .Net v4.0. So you need to target the PopManWS project to .Net 4.6 or retarget the MyApp.ServiceExtensions project to use .Net 4.0 and rebuild.
You can only reference projects that are build against the same or a lower .Net framework version.
See https://msdn.microsoft.com/en-us/library/bb398202.aspx on how to retarget.
Related
asp.net builds perfectly locally but fails on devops after adding signalR
The errors I get. [debug]Processed: vso[task.logissue type=Error;sourcepath=D:\a\1\s\Hubs\FiscalAttestsHub.cs;linenumber=9;columnnumber=24;code=CS0234;]The type or namespace name 'SignalR' does not exist in the namespace 'Microsoft.AspNet' (are you missing an assembly reference?) Hubs\FiscalAttestsHub.cs(9,24): error CS0234: The type or namespace name 'SignalR' does not exist in the namespace 'Microsoft.AspNet' (are you missing an assembly reference?) [D:\a\1\s\.csproj] [error]\Startup.cs(2,24): Error CS0234: The type or namespace name 'SignalR' does not exist in the namespace 'Microsoft.AspNet' (are you missing an assembly reference?) [debug]Processed: vso[task.logissue type=Error;sourcepath=D:\a\1\s\Startup.cs;linenumber=2;columnnumber=24;code=CS0234;]The type or namespace name 'SignalR' does not exist in the namespace 'Microsoft.AspNet' (are you missing an assembly reference?) Startup.cs(2,24): error CS0234: The type or namespace name 'SignalR' does not exist in the namespace 'Microsoft.AspNet' (are you missing an assembly reference?) [D:\a\1\s\.csproj] [error]\Hubs\FiscalAttestsHub.cs(14,37): Error CS0246: The type or namespace name 'Hub<>' could not be found (are you missing a using directive or an assembly reference?) [debug]Processed: vso[task.logissue type=Error;sourcepath=D:\a\1\s\Hubs\FiscalAttestsHub.cs;linenumber=14;columnnumber=37;code=CS0246;]The type or namespace name 'Hub<>' could not be found (are you missing a using directive or an assembly reference?) Hubs\FiscalAttestsHub.cs(14,37): error CS0246: The type or namespace name 'Hub<>' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\.csproj] [warning]\Mail\Models\PaymentReceivedMM.cs(100,23): Warning CS0108: 'PaymentReceivedMM.TenantName' hides inherited member 'MailModel.TenantName'. Use the new keyword if hiding was intended. [debug]Processed: vso[task.logissue type=Warning;sourcepath=D:\a\1\s\Mail\Models\PaymentReceivedMM.cs;linenumber=100;columnnumber=23;code=CS0108;]'PaymentReceivedMM.TenantName' hides inherited member 'MailModel.TenantName'. Use the new keyword if hiding was intended. Mail\Models\PaymentReceivedMM.cs(100,23): warning CS0108: 'PaymentReceivedMM.TenantName' hides inherited member 'MailModel.TenantName'. Use the new keyword if hiding was intended. [D:\a\1\s\.csproj] [error]\Controllers\Identity\AccountController.cs(59,17): Error CS0246: The type or namespace name 'IAuthenticationManager' could not be found (are you missing a using directive or an assembly reference?) [debug]Processed: vso[task.logissue type=Error;sourcepath=D:\a\1\s\Controllers\Identity\AccountController.cs;linenumber=59;columnnumber=17;code=CS0246;]The type or namespace name 'IAuthenticationManager' could not be found (are you missing a using directive or an assembly reference?) Controllers\Identity\AccountController.cs(59,17): error CS0246: The type or namespace name 'IAuthenticationManager' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\.csproj] [error]\Controllers\Identity\ManageController.cs(72,17): Error CS0246: The type or namespace name 'IAuthenticationManager' could not be found (are you missing a using directive or an assembly reference?) [debug]Processed: vso[task.logissue type=Error;sourcepath=D:\a\1\s\Controllers\Identity\ManageController.cs;linenumber=72;columnnumber=17;code=CS0246;]The type or namespace name 'IAuthenticationManager' could not be found (are you missing a using directive or an assembly reference?) Controllers\Identity\ManageController.cs(72,17): error CS0246: The type or namespace name 'IAuthenticationManager' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\.csproj] [error]\Models\Identity\AppRoleManager.cs(16,61): Error CS0246: The type or namespace name 'IOwinContext' could not be found (are you missing a using directive or an assembly reference?) [debug]Processed: vso[task.logissue type=Error;sourcepath=D:\a\1\s\Models\Identity\AppRoleManager.cs;linenumber=16;columnnumber=61;code=CS0246;]The type or namespace name 'IOwinContext' could not be found (are you missing a using directive or an assembly reference?) Models\Identity\AppRoleManager.cs(16,61): error CS0246: The type or namespace name 'IOwinContext' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\.csproj] [error]\Models\Identity\AppSigninManager.cs(21,97): Error CS0246: The type or namespace name 'IOwinContext' could not be found (are you missing a using directive or an assembly reference?) [debug]Processed: vso[task.logissue type=Error;sourcepath=D:\a\1\s\Models\Identity\AppSigninManager.cs;linenumber=21;columnnumber=97;code=CS0246;]The type or namespace name 'IOwinContext' could not be found (are you missing a using directive or an assembly reference?) Models\Identity\AppSigninManager.cs(21,97): error CS0246: The type or namespace name 'IOwinContext' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\.csproj] [error]\Models\Identity\AppSigninManager.cs(13,61): Error CS0246: The type or namespace name 'IAuthenticationManager' could not be found (are you missing a using directive or an assembly reference?) [debug]Processed: vso[task.logissue type=Error;sourcepath=D:\a\1\s\Models\Identity\AppSigninManager.cs;linenumber=13;columnnumber=61;code=CS0246;]The type or namespace name 'IAuthenticationManager' could not be found (are you missing a using directive or an assembly reference?) Models\Identity\AppSigninManager.cs(13,61): error CS0246: The type or namespace name 'IAuthenticationManager' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\.csproj] [error]\Models\Identity\AppUserManager.cs(24,93): Error CS0246: The type or namespace name 'IOwinContext' could not be found (are you missing a using directive or an assembly reference?) [debug]Processed: vso[task.logissue type=Error;sourcepath=D:\a\1\s\Models\Identity\AppUserManager.cs;linenumber=24;columnnumber=93;code=CS0246;]The type or namespace name 'IOwinContext' could not be found (are you missing a using directive or an assembly reference?) Models\Identity\AppUserManager.cs(24,93): error CS0246: The type or namespace name 'IOwinContext' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\.csproj] [error]\Models\Identity\ManageViewModels.cs(37,22): Error CS0246: The type or namespace name 'AuthenticationDescription' could not be found (are you missing a using directive or an assembly reference?)
Found the problem. Somehow the signalR package was no longer in the list of installed nugget packages, nevertheless local build was perfectly fine and running the app too. solution : re-add the nuget packages and now build on azure is fine too.
I can build this project in VS but not with msbuild
I'm trying to build a ms test project in a nuget app. My project structure is this: MyPackage --> MyPackage --> MyPackageTest If I open VS and right click and build MyPackageTest it works. If I go to cmd and type this I fails: msbuild .\MyPackageTest\MyPackageTest.csproj /T:build "/p:Configuration=Release" I get errors like this: "C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj" (build target) (1) -> (CoreCompile target) -> MyTests.cs(2,17): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyOtherTests.cs(2,17): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyOtherTests.cs(13,4): error CS0246: The type or namespace name 'TestClassAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyOtherTests.cs(13,4): error CS0246: The type or namespace name 'TestClass' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyTests.cs(13,4): error CS0246: The type or namespace name 'TestClassAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyTests.cs(13,4): error CS0246: The type or namespace name 'TestClass' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyOtherTests.cs(17,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyOtherTests.cs(17,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyOtherTests.cs(38,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyOtherTests.cs(38,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyOtherTests.cs(59,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyOtherTests.cs(59,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyOtherTests.cs(75,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyOtherTests.cs(75,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyOtherTests.cs(91,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyOtherTests.cs(91,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyTests.cs(16,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyTests.cs(16,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyTests.cs(36,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyTests.cs(36,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyTests.cs(50,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyTests.cs(50,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyTests.cs(65,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyTests.cs(65,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyTests.cs(81,6): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] MyTests.cs(81,6): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\me\MyPackage\MyPackageTest\MyPackageTest.csproj] EDIT: to add, msbuild also throws this error: Could not locate the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework"
I can build this project in VS but not with msbuild First of all, if you use CMD to call MSBuild, please make sure that you set the right path for the path of the Environment Variables. Just like C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin(VS2017 Community version and the MSBuild.exe exists in this path). Besides, l assume you have a local project called MyPackageTest which created by the local VS and then you migrate it to the build server without VS. Actually, the issue could be caused by the missing packages which lost during migration to build server. Meanwhile,MSBuild with command line will not restore the missing packages since you have migrated it into the Build Server. However, when you use VS IDE, the build process will restore the missing packages automatically during the build process.(Tools-->Options-->Nuget Package Manager-->General-->Packages Restore). Suggestion So please run the msbuild -t:restore first to restore the required packages.(Go to the project path first and do this). Then type this below: msbuild .\MyPackageTest\MyPackageTest.csproj /T:build "/p:Configuration=Release" In addition, you would better use Build Tool for VS2019 or Build Tool for VS2017 and please make sure that the build tool version is the same as the VS version which creates the project. Second, when you use Build Tool, also make certain that you have installed the Testing tools core features in the individual components of vs installer. Hope it could help you.
Try running msbuild in a new cmd window everytime as a temporary workaround. This works everytime for me and is what I currently do. I think running msbuild(with or without vsdevcmd) changes some environmental variables/settings which affects the subsequent msbuild runs. I faced the same problem a while ago which greatly affected my productivity. I think it started after upgrading to VS2019. My solution didn't involve any nuget packages, but msbuild would fail randomly with these errors.
The type or namespace name 'EntityFrameworkCore' does not exist in the namespace 'Microsoft
I try to do Razor ContosoUniversity (renamed in ContsoObserve initally) for Visual Studio 2017 and get error my .csproj is <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>netcoreapp2.0</TargetFramework> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.1" /> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" /> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Utils" Version="2.0.1" /> </ItemGroup> <ItemGroup> <PackageReference Update="Microsoft.NETCore.App" Version="2.0.4" /> </ItemGroup> <ItemGroup> <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" /> </ItemGroup> </Project> I installed all that packages in NuGet and when I dotnet aspnet-codegenerator razorpage -m Student -dc SchoolContext -udl -outDir Pages\Students --referenceScriptLibraries get Build FAILED. Data\SchoolContext.cs(5,17): error CS0234: The type or namespace name 'EntityFrameworkCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\About.cshtml.cs(5,32): error CS0234: The type or namespace name 'RazorPages' does not exist in the namespace 'Microsoft.AspNetCore.Mvc' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\Contact.cshtml.cs(5,32): error CS0234: The type or namespace name 'RazorPages' does not exist in the namespace 'Microsoft.AspNetCore.Mvc' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\Error.cshtml.cs(6,32): error CS0234: The type or namespace name 'RazorPages' does not exist in the namespace 'Microsoft.AspNetCore.Mvc' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\Index.cshtml.cs(6,32): error CS0234: The type or namespace name 'RazorPages' does not exist in the namespace 'Microsoft.AspNetCore.Mvc' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Program.cs(7,28): error CS0234: The type or namespace name 'Hosting' does not exist in the namespace 'Microsoft.AspNetCore' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Program.cs(8,28): error CS0234: The type or namespace name 'Configuration' does not exist in the namespace 'Microsoft.Extensions' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Program.cs(9,28): error CS0234: The type or namespace name 'Logging' does not exist in the namespace 'Microsoft.Extensions' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Startup.cs(5,28): error CS0234: The type or namespace name 'Builder' does not exist in the namespace 'Microsoft.AspNetCore' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Startup.cs(6,28): error CS0234: The type or namespace name 'Hosting' does not exist in the namespace 'Microsoft.AspNetCore' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Startup.cs(7,28): error CS0234: The type or namespace name 'Configuration' does not exist in the namespace 'Microsoft.Extensions' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Startup.cs(10,17): error CS0234: The type or namespace name 'EntityFrameworkCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\About.cshtml.cs(9,31): error CS0246: The type or namespace name 'PageModel' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Program.cs(39,23): error CS0246: The type or namespace name 'IWebHost' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(10,34): error CS0246: The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Startup.cs(21,16): error CS0246: The type or namespace name 'IConfiguration' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\Contact.cshtml.cs(9,33): error CS0246: The type or namespace name 'PageModel' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Startup.cs(33,31): error CS0246: The type or namespace name 'IApplicationBuilder' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Startup.cs(33,56): error CS0246: The type or namespace name 'IHostingEnvironment' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(16,16): error CS0246: The type or namespace name 'DbSet<>' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Startup.cs(16,24): error CS0246: The type or namespace name 'IConfiguration' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\Error.cshtml.cs(10,31): error CS0246: The type or namespace name 'PageModel' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(17,16): error CS0246: The type or namespace name 'DbSet<>' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(18,16): error CS0246: The type or namespace name 'DbSet<>' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(20,49): error CS0246: The type or namespace name 'ModelBuilder' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(20,33): error CS0115: 'SchoolContext.OnModelCreating(ModelBuilder)': no suitable method found to override [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\Index.cshtml.cs(10,31): error CS0246: The type or namespace name 'PageModel' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(12,30): error CS0246: The type or namespace name 'DbContextOptions<>' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] 0 Warning(s) 28 Error(s) I try unload and reload project. Same result. I add and errors count decrease Build FAILED. Data\SchoolContext.cs(5,17): error CS0234: The type or namespace name 'EntityFrameworkCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\About.cshtml.cs(5,32): error CS0234: The type or namespace name 'RazorPages' does not exist in the namespace 'Microsoft.AspNetCore.Mvc' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\Contact.cshtml.cs(5,32): error CS0234: The type or namespace name 'RazorPages' does not exist in the namespace 'Microsoft.AspNetCore.Mvc' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\Error.cshtml.cs(6,32): error CS0234: The type or namespace name 'RazorPages' does not exist in the namespace 'Microsoft.AspNetCore.Mvc' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\Index.cshtml.cs(6,32): error CS0234: The type or namespace name 'RazorPages' does not exist in the namespace 'Microsoft.AspNetCore.Mvc' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Startup.cs(10,17): error CS0234: The type or namespace name 'EntityFrameworkCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\About.cshtml.cs(9,31): error CS0246: The type or namespace name 'PageModel' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(10,34): error CS0246: The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\Contact.cshtml.cs(9,33): error CS0246: The type or namespace name 'PageModel' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\Error.cshtml.cs(10,31): error CS0246: The type or namespace name 'PageModel' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(16,16): error CS0246: The type or namespace name 'DbSet<>' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Pages\Index.cshtml.cs(10,31): error CS0246: The type or namespace name 'PageModel' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(17,16): error CS0246: The type or namespace name 'DbSet<>' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(18,16): error CS0246: The type or namespace name 'DbSet<>' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(20,49): error CS0246: The type or namespace name 'ModelBuilder' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(20,33): error CS0115: 'SchoolContext.OnModelCreating(ModelBuilder)': no suitable method found to override [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] Data\SchoolContext.cs(12,30): error CS0246: The type or namespace name 'DbContextOptions<>' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\STR\source\repos\ContosoObserve\ContosoObserve\ContosoObserve.csproj] 0 Warning(s)
Change your package reference to Microsoft.AspNetCore.All (currently verrsion 2.0.3). That will include Entity Framework (plus more than you will need). Also, don't use Update on the PackageReference element, use Include.
I was getting the same error message even though I have already installed "Microsoft.EntityFrameworkCore" on Visual Studio 2019. I did uninstall & reinstall and it worked fine.
Assuming your IDE is Visual studio 2017 or 2019, Go to the Nuget package manager, search and install the package(s) that start with the words Microsoft.EntityFrameworkCore they are about 3 packages in number. The errors will disappear
TeamCity compilation error
I'm having an issue with Teamcity. While running a build of my project in Visual Studio being passed successfully, running this "build" in Teamcity results with some errors difficult to understand. These are the errors I'm getting from TeamCity: AppealPersonDetails.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?) AppealPersonDetails.cs(32, 7): error CS0246: The type or namespace name 'Excel' could not be found (are you missing a using directive or an assembly reference?) AppealReportAddAnotherApplication.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?) AppealReportDetailsPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?) FinishProcessPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?) MainStatusPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?) MainTestRunner.cs(27, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?) MainTestRunner.cs(31, 7): error CS0246: The type or namespace name 'Excel' could not be found (are you missing a using directive or an assembly reference?) Queries.cs(13, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?) StatusApplicationsPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?) StatusPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
Any third party dependencies that would be in the GAC on your machine will need to be in the GAC or locally locatable on your build server. I would check the location of the assemblies that contain the Tlv and Excel namespaces and go from there. If the Excel namespace is due to depending on the Office Interop Assemblies, you will need the correct version of Excel installed on the build server. Edit based on comments: OP clarified that he was using references to the assemblies directly rather than project references. When he switched to using project references, the build order was correctly established and his problem was solved.
SignedCms alternative in .NET Core
Does an alternative to System.Security.Cryptography.Pkcs.SignedCms class exist in .NET Core? Or do I have to dig into BouncyCastle, like they do in WinRT case? Is there an alternative of SignedCMS in WinRT?
FYI in case it helps. It seems that support for SignedCms and other essential .NET classes for S/MIME are available via this NUGET package: System.Security.Cryptography.Pkcs I.e. before I added this NUGET package to my Visual Studio 2017 (VS2017) .NET Core project, I received these compilation errors: Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'CmsRecipientCollection' could not be found (are you missing a using directive or an assembly reference?) Error CS0246 The type or namespace name 'X509IssuerSerial' could not be found (are you missing a using directive or an assembly reference?) Error CS0246 The type or namespace name 'EnvelopedCms' could not be found (are you missing a using directive or an assembly reference?) Error CS0246 The type or namespace name 'SignedCms' could not be found (are you missing a using directive or an assembly reference?) Error CS0246 The type or namespace name 'SignerInfoCollection' could not be found (are you missing a using directive or an assembly reference?) Error CS0246 The type or namespace name 'ContentInfo' could not be found (are you missing a using directive or an assembly reference?) Error CS0246 The type or namespace name 'CmsRecipient' could not be found (are you missing a using directive or an assembly reference?) Error CS0246 The type or namespace name 'RecipientInfo' could not be found (are you missing a using directive or an assembly reference?) Error CS0103 The name 'SubjectIdentifierType' does not exist in the current context Error CS0246 The type or namespace name 'SignerInfo' could not be found (are you missing a using directive or an assembly reference?) Error CS1579 foreach statement cannot operate on variables of type 'SignerInfoCollection' because 'SignerInfoCollection' does not contain a public instance definition for 'GetEnumerator' Error CS0246 The type or namespace name 'CmsSigner' could not be found (are you missing a using directive or an assembly reference?) After I added the NUGET package, I could compile successfully.
No, there's no equivalent to SignedCms in .NET Core at this time. You're quite welcome to create an issue on https://github.com/dotnet/corefx/issues to indicate that it's a type that you would like to be brought over.