question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error while build

See original GitHub issue

hi, I have encountered the following error while build

D:\dnnsrc\DNN Platform\DotNetNuke.DependencyInjection\DotNetNuke.DependencyInjection.csproj(9,74): error MSB4066: The a
ttribute "Version" in element <PackageReference> is unrecognized.
Done Building Project "D:\dnnsrc\DNN Platform\DotNetNuke.DependencyInjection\DotNetNuke.DependencyInjection.csproj" (Cl
ean target(s)) -- FAILED.

Done Building Project "D:\dnnsrc\DNN Platform\Library\DotNetNuke.Library.csproj" (Clean target(s)) -- FAILED.

Done Building Project "D:\dnnsrc\DNN Platform\HttpModules\DotNetNuke.HttpModules.csproj" (Clean target(s)) -- FAILED.

Done Building Project "D:\dnnsrc\DNN Platform\DotNetNuke.Web\DotNetNuke.Web.csproj.metaproj" (Clean target(s)) -- FAILE
D.

Done Building Project "D:\dnnsrc\Website\DotNetNuke.Website.csproj.metaproj" (Clean target(s)) -- FAILED.

Project "D:\dnnsrc\DNN_Platform.sln" (2) is building "D:\dnnsrc\DNN Platform\Modules\HtmlEditorManager\DotNetNuke.Modul
es.HtmlEditorManager.csproj.metaproj" (22) on node 1 (Clean target(s)).
Project "D:\dnnsrc\DNN Platform\Modules\HtmlEditorManager\DotNetNuke.Modules.HtmlEditorManager.csproj.metaproj" (22) is
 building "D:\dnnsrc\DNN Platform\DotNetNuke.Web.Deprecated\DotNetNuke.Web.Deprecated.csproj" (23) on node 1 (Clean tar
get(s)).
Project "D:\dnnsrc\DNN Platform\DotNetNuke.Web.Deprecated\DotNetNuke.Web.Deprecated.csproj" (23) is building "D:\dnnsrc
\DNN Platform\DotNetNuke.Web\DotNetNuke.Web.csproj" (24) on node 1 (Clean target(s)).
Project "D:\dnnsrc\DNN Platform\DotNetNuke.Web\DotNetNuke.Web.csproj" (24) is building "D:\dnnsrc\DNN Platform\DotNetNu
ke.DependencyInjection\DotNetNuke.DependencyInjection.csproj" (8:2) on node 1 (Clean target(s)).
D:\dnnsrc\DNN Platform\DotNetNuke.DependencyInjection\DotNetNuke.DependencyInjection.csproj(9,74): error MSB4066: The a
ttribute "Version" in element <PackageReference> is unrecognized.
Done Building Project "D:\dnnsrc\DNN Platform\DotNetNuke.DependencyInjection\DotNetNuke.DependencyInjection.csproj" (Cl
ean target(s)) -- FAILED.

Project "D:\dnnsrc\DNN Platform\DotNetNuke.Web\DotNetNuke.Web.csproj" (24) is building "D:\dnnsrc\DNN Platform\DotNetNu
ke.ModulePipeline\DotNetNuke.ModulePipeline.csproj" (25) on node 1 (Clean target(s)).
D:\dnnsrc\DNN Platform\DotNetNuke.ModulePipeline\DotNetNuke.ModulePipeline.csproj(13,74): error MSB4066: The attribute
"Version" in element <PackageReference> is unrecognized.
Done Building Project "D:\dnnsrc\DNN Platform\DotNetNuke.ModulePipeline\DotNetNuke.ModulePipeline.csproj" (Clean target
(s)) -- FAILED.

Done Building Project "D:\dnnsrc\DNN Platform\DotNetNuke.Web\DotNetNuke.Web.csproj" (Clean target(s)) -- FAILED.

Done Building Project "D:\dnnsrc\DNN Platform\DotNetNuke.Web.Deprecated\DotNetNuke.Web.Deprecated.csproj" (Clean target
(s)) -- FAILED.

Done Building Project "D:\dnnsrc\DNN Platform\Modules\HtmlEditorManager\DotNetNuke.Modules.HtmlEditorManager.csproj.met
aproj" (Clean target(s)) -- FAILED.

Done Building Project "D:\dnnsrc\DNN_Platform.sln" (Clean target(s)) -- FAILED.

Done Building Project "D:\dnnsrc\Build\BuildScripts\CreateCommunityPackages.build" (CompileSource target(s)) -- FAILED.


Build FAILED.

"D:\dnnsrc\Build\BuildScripts\CreateCommunityPackages.build" (CompileSource target) (1) ->
"D:\dnnsrc\DNN_Platform.sln" (Clean target) (2) ->
"D:\dnnsrc\Website\DotNetNuke.Website.csproj.metaproj" (Clean target) (3) ->
"D:\dnnsrc\DNN Platform\DotNetNuke.Web\DotNetNuke.Web.csproj.metaproj" (Clean target) (4) ->
"D:\dnnsrc\DNN Platform\HttpModules\DotNetNuke.HttpModules.csproj" (Clean target) (5) ->
"D:\dnnsrc\DNN Platform\Library\DotNetNuke.Library.csproj" (Clean target) (6) ->
"D:\dnnsrc\DNN Platform\DotNetNuke.DependencyInjection\DotNetNuke.DependencyInjection.csproj" (Clean target) (8) ->
  D:\dnnsrc\DNN Platform\DotNetNuke.DependencyInjection\DotNetNuke.DependencyInjection.csproj(9,74): error MSB4066: The
 attribute "Version" in element <PackageReference> is unrecognized.


"D:\dnnsrc\Build\BuildScripts\CreateCommunityPackages.build" (CompileSource target) (1) ->
"D:\dnnsrc\DNN_Platform.sln" (Clean target) (2) ->
"D:\dnnsrc\DNN Platform\Modules\HtmlEditorManager\DotNetNuke.Modules.HtmlEditorManager.csproj.metaproj" (Clean target)
(22) ->
"D:\dnnsrc\DNN Platform\DotNetNuke.Web.Deprecated\DotNetNuke.Web.Deprecated.csproj" (Clean target) (23) ->
"D:\dnnsrc\DNN Platform\DotNetNuke.Web\DotNetNuke.Web.csproj" (Clean target) (24) ->
"D:\dnnsrc\DNN Platform\DotNetNuke.DependencyInjection\DotNetNuke.DependencyInjection.csproj" (Clean target) (8:2) ->
  D:\dnnsrc\DNN Platform\DotNetNuke.DependencyInjection\DotNetNuke.DependencyInjection.csproj(9,74): error MSB4066: The
 attribute "Version" in element <PackageReference> is unrecognized.


"D:\dnnsrc\Build\BuildScripts\CreateCommunityPackages.build" (CompileSource target) (1) ->
"D:\dnnsrc\DNN_Platform.sln" (Clean target) (2) ->
"D:\dnnsrc\DNN Platform\Modules\HtmlEditorManager\DotNetNuke.Modules.HtmlEditorManager.csproj.metaproj" (Clean target)
(22) ->
"D:\dnnsrc\DNN Platform\DotNetNuke.Web.Deprecated\DotNetNuke.Web.Deprecated.csproj" (Clean target) (23) ->
"D:\dnnsrc\DNN Platform\DotNetNuke.Web\DotNetNuke.Web.csproj" (Clean target) (24) ->
"D:\dnnsrc\DNN Platform\DotNetNuke.ModulePipeline\DotNetNuke.ModulePipeline.csproj" (Clean target) (25) ->
  D:\dnnsrc\DNN Platform\DotNetNuke.ModulePipeline\DotNetNuke.ModulePipeline.csproj(13,74): error MSB4066: The attribut
e "Version" in element <PackageReference> is unrecognized.

    0 Warning(s)
    3 Error(s)

Time Elapsed 00:00:26.78
An error occurred when executing task 'CompileSource'.
Error: One or more errors occurred.
        MSBuild: Process returned an error (exit code 1).

please help me

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bdukescommented, Oct 23, 2019

We may need to specify the Visual Studio version in the MSBuild call. There’s a pending PR which does set that (and makes lots of other build changes), with that specific change in Build/Cake/compiling.cake. You could try building off of that PR, or you could try adding c.ToolVersion = MSBuildToolVersion.VS2017; in the compile tasks.

0reactions
valadascommented, Oct 28, 2019

In the spirit of cleaning the backlog and since building is working fine in CI and for multiple others, I am closing this issue for now. @mnouraei if after updating Visual Studio you are still having problems, please open a new issue with a clear step by step of how you get to this error (ex. git clone command, build command, etc.) Oh you can also check the version of MSBuild installed by running msbuild /? which can also help troubleshoot this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix a build error
To fix a build error, select the error in the Error List and double-click it. If the error relates to: a multiply proven...
Read more >
Project build errors and warnings (PRJxxxx)
When you correct issues in your project, always start with the first error or warning that's reported, and rebuild often. One fix may...
Read more >
Why do I have error while building project?
14: error: Cannot figure out ; for it. private ; null; ^C:\Users\Maxim\AndroidStudioProjects\AdvancedNumberGenerator\app\build\tmp\kapt3\stubs\ ...
Read more >
BUILD Error Messages
There are build errors that may stop the build, for example, resources in a loop, and other messages that are tolerated, for example,...
Read more >
Oh dear! Build errors? - LoopDocs
If you have checked all those steps above and think you have a true build error, here's a tip that resolves 95% of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found