aspnet-compiler

The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) - Visual Studio 2017

对着背影说爱祢 提交于 2020-03-25 18:24:49
问题 I have ordinary ASP.NET project with .NET Framework 4.5.2, It work great as Web Site Projects (WSP), but I try to change this project to Web Application Projects (WAP). I don't change anything in body of project code, I only add designer with definition of control and add default namespace needed to WSP project. But aspnet_compiler crashed with message below (this is a part of MSBuild process): C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p E:\Projects\Arenda_5

How can I use the latest VB.NET language level in an ASP.NET web site project?

左心房为你撑大大i 提交于 2019-12-23 12:18:18
问题 I've been tasked with modernising a web application developed in 2009. It is written in VB.NET and using ASP.NET WebForms. I would like to use the latest language constructs in VB.NET. I get helpful pointers saying "Visual Basic 10.0 does not allow string interpolation", which was what I was trying to use, but I failed to find a way to raise the language level. I have the tips in this related question How to change the VB.NET language version in Visual Studio 2015, but they did not help in

Force a tool version with MSBuild from inside the file?

戏子无情 提交于 2019-12-23 10:19:33
问题 I've moved my project over to .NET 4.0 recently, and am having some trouble running the ASP.NET compiler inside of my build. This doesn't work because MSBuild by default uses an old tools version when running the ASP.NET Compiler. I've been able to address it my specifying the tools version explicitly (yes, I'm running MSBuild 4.0) like so: msbuild /t:MyTarget /tv:4.0 mybuildfile.msbuild Is there any directive I can use from within the build file itself which will allow me to call msbuild in

How do you handle excluded files with aspnet_compiler?

拟墨画扇 提交于 2019-12-23 07:26:46
问题 I'm trying to use aspnet_compiler to move a project that has already compiled from one location to another. I'm using Subversion for revision control. The process basically gets all the code out of subversion, does a build, then calls aspnet_compiler. My problem comes into being when I've got an excluded ascx file. This file is part of the latest code, but the normal build compiler ignores it, so no trouble. Aspnet_compiler blows up, however, because it cannot find the code behind for that

aspnet_compiler on Mono

孤者浪人 提交于 2019-12-21 20:17:39
问题 I'm trying to write a build script for a ASP.NET MVC 3 web site for publishing on Mono. Although some devs use Windows for development, the site must be built on Mono, as the build and Web servers are running OS X. I'm using xbuild to run MSBuild scripts on Mono. The website can be compiled without much problems. However, I'm unable to find how the equivalent of aspnet_compiler.exe on Mono. I cannot find the AspNetCompiler build task and google searches return [a stub implementation] from a

aspnet_compiler and msbuild.exe

拜拜、爱过 提交于 2019-12-21 06:03:42
问题 I am pretty new to msbuild and aspnet_compiler. I am using aspnet_compiler to compile web application project. Now I just saw the MSBuild.exe and noticed that its builds my website into the /mywebsite/precompiledWeb folder. Now why do I need to use MSBuild.exe? Can't I directly use the aspnet_compiler to see if my website can be built properly? (Not sure if I explained it very well). 回答1: msbuild.exe is usually used to build projects and its dependencies. When you have a web application

aspnet_compiler -fixednames does not work?

情到浓时终转凉″ 提交于 2019-12-13 05:48:14
问题 I am unable to get the -fixednames switch to create dlls for the cs code behind files. The files in the bin folder are compiled aspx pages, but the code behind files are all compiled into one large websitename.dll file. Here is my command with switches. aspnet_compiler -v / -p E:\Source\DotNet4\mysolution\website -f -d -fixednames E:\Source\DotNet4\CompiledWebSite This produces many files in the bin folder. website.dll and website.pdb (contains code behind) myform1.aspx.643c7876.dll (compiled

How come the attributes for event handler properties on ASP.NET controls have a prefix (OnLoad for the Load event handler)

泄露秘密 提交于 2019-12-12 12:27:31
问题 This is just for a better understanding of the ASP.NET framework. When you use a control in a declarative way (that would be web form markup), you assign event handlers by their method name using an attribute that starts with On : <asp:Button runat="server" OnClick="..."/> But when you look at the System.Web.UI.WebControls.Button class it has an EventHandler property named Click that the delegate is assigned to: button.Click += new EventHandler(...); So how is this implemented? Is that just a

Compilation Error - The compiler failed with error code 1 - asp.net error after publishing

人走茶凉 提交于 2019-12-12 02:44:22
问题 After publishing my asp.net MVC 5 website to the hosting environment, I got the following error message Compilation Error - The compiler failed with error code 1 Nothing else besides the compiler-call itself is shown. 回答1: In my case, the MVC-templates added the following section in the web.config file: <system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers

User Controls (asp.net, ascx-files) inside a C# class library, build error (aspnet_compiler.exe)

那年仲夏 提交于 2019-12-11 23:16:29
问题 Having trouble "passing" this error from ASPNET_Compiler.exe: error CS0103: The name 'TestMath' does not exist in the current context. The function called within TestMath from a user control (.cs) file, is outside of the context (scope/namespace/...). If I comment out the line that calls a method within TestMath the compilation works and so does my user control (referenced the DLL from within a WebApplication). The "TestMath"-class is a static class which contains one static method "Get",