Compiler errors

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
dvandenbossche
User
Posts: 18

Compiler errors

Post by dvandenbossche »

Installed on a new Windows 10 (x64) machine.
.NET Framework 4.6.2 is installed.
Visual Studio is not installed.

It is not possible to install another version of the NET Framework because the installation program detect a more recent version and the installation stops (see //msdn.microsoft.com/en-us/library/hh925569(v=vs.110).aspx)

What is the problem and can give someone a solution?

The solution I received is also not working:
Please try change the framework version in project.json and try again. For example (change "net452" to "net462") below:

"frameworks": {
"net452": {
"frameworkAssemblies": {
"System.Data": "4.0.0.0",
"System.Drawing": "4.0.0.0"
}
}
},

Generating with ASP.NET Maker gives the following errors:

D:\Webstite VZP Leden\VZPApp>dotnet build
Project VZPApp (.NETFramework,Version=v4.5.2) will be compiled because expected outputs are missing
Compiling VZPApp for .NETFramework,Version=v4.5.2
D:\Webstite VZP Leden\VZPApp\project.json(30,13): error DOTNET1011: Framework not installed: .NETFramework,Version=v4.5.2 in
D:\Webstite VZP Leden\VZPApp\project.json(32,28): error NU1001: The dependency System.Data >= 4.0.0 could not be resolved.
D:\Webstite VZP Leden\VZPApp\project.json(33,31): error NU1001: The dependency System.Drawing >= 4.0.0 could not be resolved.
...
D:\Webstite VZP Leden\VZPApp\project.json(3,53): error NU1001: The dependency System.Runtime.Serialization could not be resolved.

Compilation failed.
0 Warning(s)
131 Error(s)


Webmaster
User
Posts: 9425

Post by Webmaster »

dvandenbossche wrote:
Project VZPApp (.NETFramework,Version=v4.5.2) will be compiled

Your compiler is still using v4.5.2. The solution is correct, double check:

  1. Where did you modify the project.json? Make sure you change the file in the template, save and re-zip it, read "Customizing Template" in the help file first.
  2. Make sure you have re-generated the project.json. (To verify, open the newly generated project.json in a text editor and make sure "net462" is generated instead of "net452".)
  3. You can also modify the generated project.json, but it will be overwritten if you generate again. However, for testing, you can. Modify the file and then run the generated build.bat with a command prompt to re-build the project by dotnet.

(Note: ASP.NET Maker 2016 uses the latest ASP.NET Core technology, read Introduction to ASP.NET Core in the help file. It is different from previous versions and from other products.)


dvandenbossche
User
Posts: 18

Post by dvandenbossche »

I did read all about ASP.NET Core and yes ASP.NET Core is installed and yes the ASP.NET Core Hallo World is running.

However, for testing, you can. Modify the file and then run the generated build.bat with a command prompt to re-build the project by dotnet.
This is indeed what I did. The result is the same

D:\Webstite VZP Leden\VZPApp>dotnet build
Project VZPApp (.NETFramework,Version=v4.6.2) will be compiled because expected outputs are missing
Compiling VZPApp for .NETFramework,Version=v4.6.2
D:\Webstite VZP Leden\VZPApp\project.json(30,13): error DOTNET1011: Framework not installed: .NETFramework,Version=v4.6.2 in
D:\Webstite VZP Leden\VZPApp\project.json(32,28): error NU1001: The dependency System.Data >= 4.0.0 could not be resolved.
D:\Webstite VZP Leden\VZPApp\project.json(33,31): error NU1001: The dependency System.Drawing >= 4.0.0 could not be resolved.
...
D:\Webstite VZP Leden\VZPApp\project.json(5,37): error NU1001: The dependency System.Runtime.Serialization could not be resolved.
D:\Webstite VZP Leden\VZPApp\project.json(3,53): error NU1001: The dependency System.Runtime.Serialization could not be resolved.

Compilation failed.
0 Warning(s)
160 Error(s)

Time elapsed 00:00:00.1072622


Webmaster
User
Posts: 9425

Post by Webmaster »

dvandenbossche wrote:
D:\Webstite VZP Leden\VZPApp\project.json(30,13): error DOTNET1011: Framework not installed: .NETFramework,Version=v4.6.2 in

As the error message says, "Framework not installed". Make sure you have installed the .NET Framework 4.6.2 Developer Pack:
https://support.microsoft.com/en-nz/kb/3151934


dvandenbossche
User
Posts: 18

Post by dvandenbossche »

After installation of the Developer Pack and changing the project.json the program is compiling without errors. Thanks.
Still there are now other problems. See new thread.


Post Reply