Project builds but can't publish
I have an MVC project that for an uknown reason refuses to publish to a local folder in the PC.
The log says the following:
3>------ Publish started: Project: Admin, Configuration: Release Any CPU ------
3>Connecting to D:Deploys...
3>Project "Admin.csproj" (GatherAllFilesToPublish target(s)):
3> Building with tools version "14.0".
3> Target "ValidateMSBuildToolsVersion" skipped. Previously built unsuccessfully.
3>Done building project "Admin.csproj" -- FAILED.
3>
========== Build: 2 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
I haven't had a problem debugging on either release or debug config.
c# asp.net asp.net-mvc visual-studio visual-studio-2015
|
show 1 more comment
I have an MVC project that for an uknown reason refuses to publish to a local folder in the PC.
The log says the following:
3>------ Publish started: Project: Admin, Configuration: Release Any CPU ------
3>Connecting to D:Deploys...
3>Project "Admin.csproj" (GatherAllFilesToPublish target(s)):
3> Building with tools version "14.0".
3> Target "ValidateMSBuildToolsVersion" skipped. Previously built unsuccessfully.
3>Done building project "Admin.csproj" -- FAILED.
3>
========== Build: 2 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
I haven't had a problem debugging on either release or debug config.
c# asp.net asp.net-mvc visual-studio visual-studio-2015
What does a more verbose output say? blogs.msdn.microsoft.com/saraford/2008/10/07/…
– Caramiriel
Jan 4 at 20:27
@Caramiriel Hi! I already have it on the "diagnostic" option. The "detailed" one also outputs the same.
– Hrodger
Jan 4 at 20:28
try a clean/rebuild. restart visual studio.
– Joseph Mawer
Jan 4 at 20:55
@JMawer Hi! Already did that. Delete obj/bin folders, restart VS, restart PC.
– Hrodger
Jan 4 at 21:39
Perhaps you don't have permission to publish to that folder location? Have you tried installing to a location you are certain you have read/write permissions?
– Joseph Mawer
Jan 4 at 21:43
|
show 1 more comment
I have an MVC project that for an uknown reason refuses to publish to a local folder in the PC.
The log says the following:
3>------ Publish started: Project: Admin, Configuration: Release Any CPU ------
3>Connecting to D:Deploys...
3>Project "Admin.csproj" (GatherAllFilesToPublish target(s)):
3> Building with tools version "14.0".
3> Target "ValidateMSBuildToolsVersion" skipped. Previously built unsuccessfully.
3>Done building project "Admin.csproj" -- FAILED.
3>
========== Build: 2 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
I haven't had a problem debugging on either release or debug config.
c# asp.net asp.net-mvc visual-studio visual-studio-2015
I have an MVC project that for an uknown reason refuses to publish to a local folder in the PC.
The log says the following:
3>------ Publish started: Project: Admin, Configuration: Release Any CPU ------
3>Connecting to D:Deploys...
3>Project "Admin.csproj" (GatherAllFilesToPublish target(s)):
3> Building with tools version "14.0".
3> Target "ValidateMSBuildToolsVersion" skipped. Previously built unsuccessfully.
3>Done building project "Admin.csproj" -- FAILED.
3>
========== Build: 2 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
I haven't had a problem debugging on either release or debug config.
c# asp.net asp.net-mvc visual-studio visual-studio-2015
c# asp.net asp.net-mvc visual-studio visual-studio-2015
asked Jan 4 at 20:23
Hrodger
921714
921714
What does a more verbose output say? blogs.msdn.microsoft.com/saraford/2008/10/07/…
– Caramiriel
Jan 4 at 20:27
@Caramiriel Hi! I already have it on the "diagnostic" option. The "detailed" one also outputs the same.
– Hrodger
Jan 4 at 20:28
try a clean/rebuild. restart visual studio.
– Joseph Mawer
Jan 4 at 20:55
@JMawer Hi! Already did that. Delete obj/bin folders, restart VS, restart PC.
– Hrodger
Jan 4 at 21:39
Perhaps you don't have permission to publish to that folder location? Have you tried installing to a location you are certain you have read/write permissions?
– Joseph Mawer
Jan 4 at 21:43
|
show 1 more comment
What does a more verbose output say? blogs.msdn.microsoft.com/saraford/2008/10/07/…
– Caramiriel
Jan 4 at 20:27
@Caramiriel Hi! I already have it on the "diagnostic" option. The "detailed" one also outputs the same.
– Hrodger
Jan 4 at 20:28
try a clean/rebuild. restart visual studio.
– Joseph Mawer
Jan 4 at 20:55
@JMawer Hi! Already did that. Delete obj/bin folders, restart VS, restart PC.
– Hrodger
Jan 4 at 21:39
Perhaps you don't have permission to publish to that folder location? Have you tried installing to a location you are certain you have read/write permissions?
– Joseph Mawer
Jan 4 at 21:43
What does a more verbose output say? blogs.msdn.microsoft.com/saraford/2008/10/07/…
– Caramiriel
Jan 4 at 20:27
What does a more verbose output say? blogs.msdn.microsoft.com/saraford/2008/10/07/…
– Caramiriel
Jan 4 at 20:27
@Caramiriel Hi! I already have it on the "diagnostic" option. The "detailed" one also outputs the same.
– Hrodger
Jan 4 at 20:28
@Caramiriel Hi! I already have it on the "diagnostic" option. The "detailed" one also outputs the same.
– Hrodger
Jan 4 at 20:28
try a clean/rebuild. restart visual studio.
– Joseph Mawer
Jan 4 at 20:55
try a clean/rebuild. restart visual studio.
– Joseph Mawer
Jan 4 at 20:55
@JMawer Hi! Already did that. Delete obj/bin folders, restart VS, restart PC.
– Hrodger
Jan 4 at 21:39
@JMawer Hi! Already did that. Delete obj/bin folders, restart VS, restart PC.
– Hrodger
Jan 4 at 21:39
Perhaps you don't have permission to publish to that folder location? Have you tried installing to a location you are certain you have read/write permissions?
– Joseph Mawer
Jan 4 at 21:43
Perhaps you don't have permission to publish to that folder location? Have you tried installing to a location you are certain you have read/write permissions?
– Joseph Mawer
Jan 4 at 21:43
|
show 1 more comment
9 Answers
9
active
oldest
votes
So I made it work.
The problem was the version of the "Microsoft.Net.Compilers". I downgraded from v2.6.1 to v2.4.0.
I don't know why so if someone knows it would be cool to know.
1
Thanks this problem was getting on my nerves, would really want to know why this is happening.
– ShrtTth
Jan 10 at 20:21
Not just an issue with web publish; I had the problem that my solution rebuild was always failing because of this (two MVC projects, one as a dependency of the other the second one would always fail if the first one still needed to be built).
– Bjørn van Dommelen
Jan 17 at 14:11
6
According to [github.com/dotnet/roslyn/wiki/NuGet-packages] the 2+ versions of the compilers package are for VS2017 and C#7. Also see [github.com/dotnet/roslyn/issues/19128] for what's supported where. Why it actually works with 2.4 and not with 2.6.1 (it shouldn't work with 2.4 either); I can only imagine the build tasks were updated with 2.4 but not with 2.6.1 so 2.6.1 requires MSBUILD 15 again (VS2015 has MSBUILD 14).
– Bjørn van Dommelen
Jan 17 at 14:34
Going to 2.4.0 fixed for me as well. Per dup suggestion here: stackoverflow.com/questions/48272051/…
– Chris Emerson
Feb 23 at 12:14
1
Had the same, I just uninstalled .Net.Compilers. also solved the problem
– Jaime Yule
Mar 19 at 14:36
|
show 4 more comments
Sorry for reopening the thread, but for me Cleaning the solution worked on .NET.Compilers v2.7 (Visual Studio 2015).
The same worked for me in VS2017, along with deleting all the existingobjandbinfolders in sub-projects.
– Rory McCrossan
Jun 19 at 13:44
add a comment |
First, select the mode (Debug or Release). Then right click on the solution/project then select Clean. Then choose Rebuild. Then Publish.
add a comment |
This just happened to me, it turned out to be a simple case of using an int in a ViewComponent call from a razor template, when that argument should have been a Guid. For some reason Intellisense didn't pick it up, I had to turn on detailed verbosity to see the error in the build process.
add a comment |
downgrade "Microsoft.Net.Compilers" from v2.9.0 to v2.4.0 works like a charm
add a comment |
I was able to resolve my issue altogether by removing the NuGet package "Microsoft.Net.Compilers", rather than downgrade to 2.4.0.
(For quite some time, the Publish error would disappear if I simply restarted VS, but eventually that stopped working.)
add a comment |
I had this problem in Asp.net Core 2 MVC 2.1
So there was no Microsoft.Net.Compilers in my solution. I tried to rebuild all projects, unload / load again but there was no change.
1) So, I have upgraded VS 2017 15.7.3 to 15.8.7
2) Then deleted all bin/release directory contents from each projects in solution.
3) Then deleted all obj directory contents from each projects in solution.
4) Then rebuilded all projects one by one.
Then tried to publish and it succeded.
Maybe if I tried from step 2 in old Visual Studio it would be succed.
add a comment |
Try opening the solution with Visual Studio 2017
I had been building and publishing from Visual Studio 2015, as that is the version of Visual Studio that the Version Selector picked when I opened the solution file.
I tried opening my solution file from Visual Studio 2017 instead, and that succeeded in publishing.
add a comment |
I had switched to C# 7.3 in Properties > Build > Advanced, but accidentally only did so for the Debug configuration. When publishing (using Release configuration) it was still using C# 7.0, which lacked some of the language features I had used.
Errors weren't visible in the Error List pane, only in the Output pane.
Setting the language version to C# 7.3 for "All Configurations" solved it for me.
This was using current version of Visual Studio 2017, Microsoft.Net.Compilers package not included in project.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f48103014%2fproject-builds-but-cant-publish%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
9 Answers
9
active
oldest
votes
9 Answers
9
active
oldest
votes
active
oldest
votes
active
oldest
votes
So I made it work.
The problem was the version of the "Microsoft.Net.Compilers". I downgraded from v2.6.1 to v2.4.0.
I don't know why so if someone knows it would be cool to know.
1
Thanks this problem was getting on my nerves, would really want to know why this is happening.
– ShrtTth
Jan 10 at 20:21
Not just an issue with web publish; I had the problem that my solution rebuild was always failing because of this (two MVC projects, one as a dependency of the other the second one would always fail if the first one still needed to be built).
– Bjørn van Dommelen
Jan 17 at 14:11
6
According to [github.com/dotnet/roslyn/wiki/NuGet-packages] the 2+ versions of the compilers package are for VS2017 and C#7. Also see [github.com/dotnet/roslyn/issues/19128] for what's supported where. Why it actually works with 2.4 and not with 2.6.1 (it shouldn't work with 2.4 either); I can only imagine the build tasks were updated with 2.4 but not with 2.6.1 so 2.6.1 requires MSBUILD 15 again (VS2015 has MSBUILD 14).
– Bjørn van Dommelen
Jan 17 at 14:34
Going to 2.4.0 fixed for me as well. Per dup suggestion here: stackoverflow.com/questions/48272051/…
– Chris Emerson
Feb 23 at 12:14
1
Had the same, I just uninstalled .Net.Compilers. also solved the problem
– Jaime Yule
Mar 19 at 14:36
|
show 4 more comments
So I made it work.
The problem was the version of the "Microsoft.Net.Compilers". I downgraded from v2.6.1 to v2.4.0.
I don't know why so if someone knows it would be cool to know.
1
Thanks this problem was getting on my nerves, would really want to know why this is happening.
– ShrtTth
Jan 10 at 20:21
Not just an issue with web publish; I had the problem that my solution rebuild was always failing because of this (two MVC projects, one as a dependency of the other the second one would always fail if the first one still needed to be built).
– Bjørn van Dommelen
Jan 17 at 14:11
6
According to [github.com/dotnet/roslyn/wiki/NuGet-packages] the 2+ versions of the compilers package are for VS2017 and C#7. Also see [github.com/dotnet/roslyn/issues/19128] for what's supported where. Why it actually works with 2.4 and not with 2.6.1 (it shouldn't work with 2.4 either); I can only imagine the build tasks were updated with 2.4 but not with 2.6.1 so 2.6.1 requires MSBUILD 15 again (VS2015 has MSBUILD 14).
– Bjørn van Dommelen
Jan 17 at 14:34
Going to 2.4.0 fixed for me as well. Per dup suggestion here: stackoverflow.com/questions/48272051/…
– Chris Emerson
Feb 23 at 12:14
1
Had the same, I just uninstalled .Net.Compilers. also solved the problem
– Jaime Yule
Mar 19 at 14:36
|
show 4 more comments
So I made it work.
The problem was the version of the "Microsoft.Net.Compilers". I downgraded from v2.6.1 to v2.4.0.
I don't know why so if someone knows it would be cool to know.
So I made it work.
The problem was the version of the "Microsoft.Net.Compilers". I downgraded from v2.6.1 to v2.4.0.
I don't know why so if someone knows it would be cool to know.
answered Jan 4 at 21:53
Hrodger
921714
921714
1
Thanks this problem was getting on my nerves, would really want to know why this is happening.
– ShrtTth
Jan 10 at 20:21
Not just an issue with web publish; I had the problem that my solution rebuild was always failing because of this (two MVC projects, one as a dependency of the other the second one would always fail if the first one still needed to be built).
– Bjørn van Dommelen
Jan 17 at 14:11
6
According to [github.com/dotnet/roslyn/wiki/NuGet-packages] the 2+ versions of the compilers package are for VS2017 and C#7. Also see [github.com/dotnet/roslyn/issues/19128] for what's supported where. Why it actually works with 2.4 and not with 2.6.1 (it shouldn't work with 2.4 either); I can only imagine the build tasks were updated with 2.4 but not with 2.6.1 so 2.6.1 requires MSBUILD 15 again (VS2015 has MSBUILD 14).
– Bjørn van Dommelen
Jan 17 at 14:34
Going to 2.4.0 fixed for me as well. Per dup suggestion here: stackoverflow.com/questions/48272051/…
– Chris Emerson
Feb 23 at 12:14
1
Had the same, I just uninstalled .Net.Compilers. also solved the problem
– Jaime Yule
Mar 19 at 14:36
|
show 4 more comments
1
Thanks this problem was getting on my nerves, would really want to know why this is happening.
– ShrtTth
Jan 10 at 20:21
Not just an issue with web publish; I had the problem that my solution rebuild was always failing because of this (two MVC projects, one as a dependency of the other the second one would always fail if the first one still needed to be built).
– Bjørn van Dommelen
Jan 17 at 14:11
6
According to [github.com/dotnet/roslyn/wiki/NuGet-packages] the 2+ versions of the compilers package are for VS2017 and C#7. Also see [github.com/dotnet/roslyn/issues/19128] for what's supported where. Why it actually works with 2.4 and not with 2.6.1 (it shouldn't work with 2.4 either); I can only imagine the build tasks were updated with 2.4 but not with 2.6.1 so 2.6.1 requires MSBUILD 15 again (VS2015 has MSBUILD 14).
– Bjørn van Dommelen
Jan 17 at 14:34
Going to 2.4.0 fixed for me as well. Per dup suggestion here: stackoverflow.com/questions/48272051/…
– Chris Emerson
Feb 23 at 12:14
1
Had the same, I just uninstalled .Net.Compilers. also solved the problem
– Jaime Yule
Mar 19 at 14:36
1
1
Thanks this problem was getting on my nerves, would really want to know why this is happening.
– ShrtTth
Jan 10 at 20:21
Thanks this problem was getting on my nerves, would really want to know why this is happening.
– ShrtTth
Jan 10 at 20:21
Not just an issue with web publish; I had the problem that my solution rebuild was always failing because of this (two MVC projects, one as a dependency of the other the second one would always fail if the first one still needed to be built).
– Bjørn van Dommelen
Jan 17 at 14:11
Not just an issue with web publish; I had the problem that my solution rebuild was always failing because of this (two MVC projects, one as a dependency of the other the second one would always fail if the first one still needed to be built).
– Bjørn van Dommelen
Jan 17 at 14:11
6
6
According to [github.com/dotnet/roslyn/wiki/NuGet-packages] the 2+ versions of the compilers package are for VS2017 and C#7. Also see [github.com/dotnet/roslyn/issues/19128] for what's supported where. Why it actually works with 2.4 and not with 2.6.1 (it shouldn't work with 2.4 either); I can only imagine the build tasks were updated with 2.4 but not with 2.6.1 so 2.6.1 requires MSBUILD 15 again (VS2015 has MSBUILD 14).
– Bjørn van Dommelen
Jan 17 at 14:34
According to [github.com/dotnet/roslyn/wiki/NuGet-packages] the 2+ versions of the compilers package are for VS2017 and C#7. Also see [github.com/dotnet/roslyn/issues/19128] for what's supported where. Why it actually works with 2.4 and not with 2.6.1 (it shouldn't work with 2.4 either); I can only imagine the build tasks were updated with 2.4 but not with 2.6.1 so 2.6.1 requires MSBUILD 15 again (VS2015 has MSBUILD 14).
– Bjørn van Dommelen
Jan 17 at 14:34
Going to 2.4.0 fixed for me as well. Per dup suggestion here: stackoverflow.com/questions/48272051/…
– Chris Emerson
Feb 23 at 12:14
Going to 2.4.0 fixed for me as well. Per dup suggestion here: stackoverflow.com/questions/48272051/…
– Chris Emerson
Feb 23 at 12:14
1
1
Had the same, I just uninstalled .Net.Compilers. also solved the problem
– Jaime Yule
Mar 19 at 14:36
Had the same, I just uninstalled .Net.Compilers. also solved the problem
– Jaime Yule
Mar 19 at 14:36
|
show 4 more comments
Sorry for reopening the thread, but for me Cleaning the solution worked on .NET.Compilers v2.7 (Visual Studio 2015).
The same worked for me in VS2017, along with deleting all the existingobjandbinfolders in sub-projects.
– Rory McCrossan
Jun 19 at 13:44
add a comment |
Sorry for reopening the thread, but for me Cleaning the solution worked on .NET.Compilers v2.7 (Visual Studio 2015).
The same worked for me in VS2017, along with deleting all the existingobjandbinfolders in sub-projects.
– Rory McCrossan
Jun 19 at 13:44
add a comment |
Sorry for reopening the thread, but for me Cleaning the solution worked on .NET.Compilers v2.7 (Visual Studio 2015).
Sorry for reopening the thread, but for me Cleaning the solution worked on .NET.Compilers v2.7 (Visual Studio 2015).
answered Apr 25 at 4:41
eLGi
63110
63110
The same worked for me in VS2017, along with deleting all the existingobjandbinfolders in sub-projects.
– Rory McCrossan
Jun 19 at 13:44
add a comment |
The same worked for me in VS2017, along with deleting all the existingobjandbinfolders in sub-projects.
– Rory McCrossan
Jun 19 at 13:44
The same worked for me in VS2017, along with deleting all the existing
obj and bin folders in sub-projects.– Rory McCrossan
Jun 19 at 13:44
The same worked for me in VS2017, along with deleting all the existing
obj and bin folders in sub-projects.– Rory McCrossan
Jun 19 at 13:44
add a comment |
First, select the mode (Debug or Release). Then right click on the solution/project then select Clean. Then choose Rebuild. Then Publish.
add a comment |
First, select the mode (Debug or Release). Then right click on the solution/project then select Clean. Then choose Rebuild. Then Publish.
add a comment |
First, select the mode (Debug or Release). Then right click on the solution/project then select Clean. Then choose Rebuild. Then Publish.
First, select the mode (Debug or Release). Then right click on the solution/project then select Clean. Then choose Rebuild. Then Publish.
answered Oct 25 at 11:50
Jin Ginusuke
27119
27119
add a comment |
add a comment |
This just happened to me, it turned out to be a simple case of using an int in a ViewComponent call from a razor template, when that argument should have been a Guid. For some reason Intellisense didn't pick it up, I had to turn on detailed verbosity to see the error in the build process.
add a comment |
This just happened to me, it turned out to be a simple case of using an int in a ViewComponent call from a razor template, when that argument should have been a Guid. For some reason Intellisense didn't pick it up, I had to turn on detailed verbosity to see the error in the build process.
add a comment |
This just happened to me, it turned out to be a simple case of using an int in a ViewComponent call from a razor template, when that argument should have been a Guid. For some reason Intellisense didn't pick it up, I had to turn on detailed verbosity to see the error in the build process.
This just happened to me, it turned out to be a simple case of using an int in a ViewComponent call from a razor template, when that argument should have been a Guid. For some reason Intellisense didn't pick it up, I had to turn on detailed verbosity to see the error in the build process.
answered Aug 22 at 13:50
jmdon
569312
569312
add a comment |
add a comment |
downgrade "Microsoft.Net.Compilers" from v2.9.0 to v2.4.0 works like a charm
add a comment |
downgrade "Microsoft.Net.Compilers" from v2.9.0 to v2.4.0 works like a charm
add a comment |
downgrade "Microsoft.Net.Compilers" from v2.9.0 to v2.4.0 works like a charm
downgrade "Microsoft.Net.Compilers" from v2.9.0 to v2.4.0 works like a charm
answered Aug 31 at 3:11
Diego Ruiz de Chavez
115
115
add a comment |
add a comment |
I was able to resolve my issue altogether by removing the NuGet package "Microsoft.Net.Compilers", rather than downgrade to 2.4.0.
(For quite some time, the Publish error would disappear if I simply restarted VS, but eventually that stopped working.)
add a comment |
I was able to resolve my issue altogether by removing the NuGet package "Microsoft.Net.Compilers", rather than downgrade to 2.4.0.
(For quite some time, the Publish error would disappear if I simply restarted VS, but eventually that stopped working.)
add a comment |
I was able to resolve my issue altogether by removing the NuGet package "Microsoft.Net.Compilers", rather than downgrade to 2.4.0.
(For quite some time, the Publish error would disappear if I simply restarted VS, but eventually that stopped working.)
I was able to resolve my issue altogether by removing the NuGet package "Microsoft.Net.Compilers", rather than downgrade to 2.4.0.
(For quite some time, the Publish error would disappear if I simply restarted VS, but eventually that stopped working.)
answered Oct 9 at 19:45
zanussi
70521826
70521826
add a comment |
add a comment |
I had this problem in Asp.net Core 2 MVC 2.1
So there was no Microsoft.Net.Compilers in my solution. I tried to rebuild all projects, unload / load again but there was no change.
1) So, I have upgraded VS 2017 15.7.3 to 15.8.7
2) Then deleted all bin/release directory contents from each projects in solution.
3) Then deleted all obj directory contents from each projects in solution.
4) Then rebuilded all projects one by one.
Then tried to publish and it succeded.
Maybe if I tried from step 2 in old Visual Studio it would be succed.
add a comment |
I had this problem in Asp.net Core 2 MVC 2.1
So there was no Microsoft.Net.Compilers in my solution. I tried to rebuild all projects, unload / load again but there was no change.
1) So, I have upgraded VS 2017 15.7.3 to 15.8.7
2) Then deleted all bin/release directory contents from each projects in solution.
3) Then deleted all obj directory contents from each projects in solution.
4) Then rebuilded all projects one by one.
Then tried to publish and it succeded.
Maybe if I tried from step 2 in old Visual Studio it would be succed.
add a comment |
I had this problem in Asp.net Core 2 MVC 2.1
So there was no Microsoft.Net.Compilers in my solution. I tried to rebuild all projects, unload / load again but there was no change.
1) So, I have upgraded VS 2017 15.7.3 to 15.8.7
2) Then deleted all bin/release directory contents from each projects in solution.
3) Then deleted all obj directory contents from each projects in solution.
4) Then rebuilded all projects one by one.
Then tried to publish and it succeded.
Maybe if I tried from step 2 in old Visual Studio it would be succed.
I had this problem in Asp.net Core 2 MVC 2.1
So there was no Microsoft.Net.Compilers in my solution. I tried to rebuild all projects, unload / load again but there was no change.
1) So, I have upgraded VS 2017 15.7.3 to 15.8.7
2) Then deleted all bin/release directory contents from each projects in solution.
3) Then deleted all obj directory contents from each projects in solution.
4) Then rebuilded all projects one by one.
Then tried to publish and it succeded.
Maybe if I tried from step 2 in old Visual Studio it would be succed.
answered Oct 21 at 9:35
Omer Faruk KAYA
11
11
add a comment |
add a comment |
Try opening the solution with Visual Studio 2017
I had been building and publishing from Visual Studio 2015, as that is the version of Visual Studio that the Version Selector picked when I opened the solution file.
I tried opening my solution file from Visual Studio 2017 instead, and that succeeded in publishing.
add a comment |
Try opening the solution with Visual Studio 2017
I had been building and publishing from Visual Studio 2015, as that is the version of Visual Studio that the Version Selector picked when I opened the solution file.
I tried opening my solution file from Visual Studio 2017 instead, and that succeeded in publishing.
add a comment |
Try opening the solution with Visual Studio 2017
I had been building and publishing from Visual Studio 2015, as that is the version of Visual Studio that the Version Selector picked when I opened the solution file.
I tried opening my solution file from Visual Studio 2017 instead, and that succeeded in publishing.
Try opening the solution with Visual Studio 2017
I had been building and publishing from Visual Studio 2015, as that is the version of Visual Studio that the Version Selector picked when I opened the solution file.
I tried opening my solution file from Visual Studio 2017 instead, and that succeeded in publishing.
answered Nov 12 at 1:29
Nacht
2,0141931
2,0141931
add a comment |
add a comment |
I had switched to C# 7.3 in Properties > Build > Advanced, but accidentally only did so for the Debug configuration. When publishing (using Release configuration) it was still using C# 7.0, which lacked some of the language features I had used.
Errors weren't visible in the Error List pane, only in the Output pane.
Setting the language version to C# 7.3 for "All Configurations" solved it for me.
This was using current version of Visual Studio 2017, Microsoft.Net.Compilers package not included in project.
add a comment |
I had switched to C# 7.3 in Properties > Build > Advanced, but accidentally only did so for the Debug configuration. When publishing (using Release configuration) it was still using C# 7.0, which lacked some of the language features I had used.
Errors weren't visible in the Error List pane, only in the Output pane.
Setting the language version to C# 7.3 for "All Configurations" solved it for me.
This was using current version of Visual Studio 2017, Microsoft.Net.Compilers package not included in project.
add a comment |
I had switched to C# 7.3 in Properties > Build > Advanced, but accidentally only did so for the Debug configuration. When publishing (using Release configuration) it was still using C# 7.0, which lacked some of the language features I had used.
Errors weren't visible in the Error List pane, only in the Output pane.
Setting the language version to C# 7.3 for "All Configurations" solved it for me.
This was using current version of Visual Studio 2017, Microsoft.Net.Compilers package not included in project.
I had switched to C# 7.3 in Properties > Build > Advanced, but accidentally only did so for the Debug configuration. When publishing (using Release configuration) it was still using C# 7.0, which lacked some of the language features I had used.
Errors weren't visible in the Error List pane, only in the Output pane.
Setting the language version to C# 7.3 for "All Configurations" solved it for me.
This was using current version of Visual Studio 2017, Microsoft.Net.Compilers package not included in project.
answered Dec 20 at 9:08
Ted Nyberg
3,85642555
3,85642555
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f48103014%2fproject-builds-but-cant-publish%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What does a more verbose output say? blogs.msdn.microsoft.com/saraford/2008/10/07/…
– Caramiriel
Jan 4 at 20:27
@Caramiriel Hi! I already have it on the "diagnostic" option. The "detailed" one also outputs the same.
– Hrodger
Jan 4 at 20:28
try a clean/rebuild. restart visual studio.
– Joseph Mawer
Jan 4 at 20:55
@JMawer Hi! Already did that. Delete obj/bin folders, restart VS, restart PC.
– Hrodger
Jan 4 at 21:39
Perhaps you don't have permission to publish to that folder location? Have you tried installing to a location you are certain you have read/write permissions?
– Joseph Mawer
Jan 4 at 21:43