I've never seen Visual Studio try to compile a web.config file before. But I'm getting compilation errors on almost every line of the file.
First line consists of
<?xml version="1.0"?>
And I get 7 errors.
Severity Code Description Project File Line Suppression State
Error CS1022 Type or namespace definition, or end-of-file expected Portal {Path}\Views\Web.config 1 Active
Error CS1031 Type expected Portal {Path}\Views\Web.config 1 Active
Error CS1002 ; expected Portal {Path}\Views\Web.config 1 Active
Error CS0116 A namespace cannot directly contain members such as fields or methods Portal {Path}\Views\Web.config 1 Active
Error CS1022 Type or namespace definition, or end-of-file expected Portal {Path}\Views\Web.config 1 Active
Error CS1031 Type expected Portal {Path}\Views\Web.config 1 Active
Error CS1022 Type or namespace definition, or end-of-file expected Portal {Path}\Views\Web.config 1 Active
Why would it be compiling this file and how do I tell it not to?
Removing the file from the project and re-adding it fixed the problem.
Comparing before and after, the csproj had the file listed as Compile instead of Content.
<Content Include="{Path}\Web.config" />
Related
I was trying to enable/configure basic workflow in sensenet back-end application. I performed the following steps and I am getting the error mentioned below.
Steps performed
I had enabled approval for one document library (Home / workspaces / Document Workspaces / London Document Workspace / Document library) in Sensenet demo server
I assigned workflow for approval and checked all 4 available options for initiating workflow
I created a new content and while uploading (all workflows were set to automatically execute), I got the following error
The following errors were encountered while processing the workflow tree:\n DynamicActivity : The private implementation of activity 1: DynamicActivity has the following validation error: Compiler error(s) encountered processing expression CType(StateContent( Workspace ), SenseNet.ContentRepository.GenericContent).Path & /Tasks .\nReference required to assembly netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 containing the base class System.Object . Add one to your project.\n
How can I rectify this?
I'm getting errors when Creating App Packages for a UWP Win 10 application.
On my machine the error is:
C:\Users\Developer\.nuget\packages\nodatime\2.4.0\lib\netstandard2.0\NodaTime.pdb : fatal error CMF1106: failed to open input PDB file for reading (PDB error code = 11)3 input PDB file is not generated by /DEBUG:fastlinkW must read and agree to the Data Collection Policy at MSPDBCMF : fatal error CMF1000: internal error
The pdb file exists in the mentioned directory: C:\Users\Developer\.nuget\packages\nodatime\2.4.0\lib\netstandard2.0
On a hosted VSTS build the error message is even more cryptic:
C:\Users\VssAdministrator\.nuget\packages\nodatime\2.4.0\lib\netstandard2.0\NodaTime.pdb : fatal error CMF1106: failed to open input PDB file for reading (PDB error code = 11)3 input PDB file is not generated by /DEBUG:fastlinkW must read and agree to the Data Collection Policy at ??? before using /errorreport:send1 warning treated as error; the PDB file is intact# specified output filename is too long (exceeding 0 characters)
Note 1: On my machine the package is actaully successfully created but on the VSTS build the step fails as it detects the error in logs and stops.
Note 2: I'm pretty sure this is not NodaTime specific. This is about something else...
My msbuild switches are:
/p:AppxBundlePlatforms="$(BuildPlatform)"
/p:AppxPackageDir="$(Build.ArtifactStagingDirectory)\AppxPackages\"
/p:AppxBundle=Never
/p:UapAppxPackageBuildMode=StoreUpload
I am now trying with extra /p:DebugSymbols=false /p:DebugType=None, but even if it fails, I would like to understand and eliminate the 'fastlink' errors.
Explicitly setting DebugType to pdbonly worked in my case, but not sure if you need portable debug symbols or not, so this might not be an option for you.
<PropertyGroup>
<DebugType>pdbonly</DebugType>
</PropertyGroup>
I'm using the Microsoft.CodeAnalysis.Emit to compile a Visual Basic project and generate .dll file with following compilation options.
VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary, optimizationLevel: OptimizationLevel.Debug);
Following error is thrown by the emitter for all VB projects I tried to compile. Please advice how to resolve this.
vstest.executionengine.x86.exe Error: 0 : xxxxx -,
C:\Projects\xxxx\xxxxx\My Project\Settings.Designer.vb(67,48): error
BC30002: Type 'Global.xxxx.xxxx.Console.VBTestApp.My.MySettings' is
not defined.
To compile the generated Settings.Designer.vb file correctly, you have to set the root namespace of the project to the same one the file was generated with. In your case, that seems to be xxxx.xxxx.Console.VBTestApp, so your options should be:
new VisualBasicCompilationOptions(
OutputKind.DynamicallyLinkedLibrary,
optimizationLevel: OptimizationLevel.Debug,
rootNamespace: "xxxx.xxxx.Console.VBTestApp")
I found voip example on github for UWP. Now I'm trying to create my voip app, and I want to use VoipHost project in my app. I added existing project, edited package manifest file. When I want to deploy the app to the device I get error:
Severity Code
Description Project
File Line
Suppression State Error
DEP6701 : Bootstrapping failed with unexpected error: 'The ID value is not specified. Parameter name: id'.
VoipHost
And one warning:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(1930,5): warning APPX1708: The executable 'VoipHost.exe' is specified as the implementation for the .winmd file. Only in-process servers are supported for generating registration information in the app manifest. You must specify the out-of-process server registration information in the app manifest.
Any advices?
Many thanks.
I had a similar issue deploying a headless application with Windows IoT running in a Raspberry pi 3. I solved the problem giving an "Assembly Identity" in the project properties.
You can do that following the next steps: Rigth Click to project --> Properties --> Manifest Tool --> General.
Fill the field "Assembly Identity" with any number. After that compiles, run and works like a charm.
I renamed one of my ViewModels. Upon doing so, VS Express 2013 for Web asked me if I want it to change the name throughout my project and of course I said yes...
Well, now when I visit the page that uses that particular ViewModel I am given the following compilation error:
Compiler Error Message: CS0234: The type or namespace name
'OldNameViewModel' does not exist in the namespace
'MyProject.ViewModels' (are you missing an assembly reference?)
It shows me the following lines of code...
Line 28:
Line 29:
Line 30: public class _Page_Views_Inventory_Create_cshtml : System.Web.Mvc.WebViewPage<MyProject.ViewModels.OldNameViewModel> {
Line 31:
Line 32: #line hidden
...and it gives me a path to the file where this code is located:
Source File: c:\Users\Jason\AppData\Local\Temp\Temporary ASP.NET
Files\root\d4024d39\1941e695\App_Web_create.cshtml.7f862902.aox9w9wr.0.cs
I went there and changed the <MyProject.ViewModels.OldNameViewModel> bit to <MyProject.ViewModels.NewNameViewModel> and saved...
I refreshed the page, same problem. I rebuilt, same problem. I deleted the entire "Temporary ASP.NET Files" directory, same problem. I deleted the directory, closed IIS Express, closed VS, and then reopened, rebuilt, etc.—same problem: it keeps replacing the file with a new file using the OldNameViewModel.
Is this normal or has something funky happened? Either way, how do I fix this?
Thanks!