visual studio 2017 publish error - asp.net-core-mvc

Using WebDeploy to publish to an Azure Web Site fails with error:
Error The target "GetCopyToPublishDirectoryItems" does not exist in the project.
Visual Studio 2017 RC - latest download
I created an empty ASP .net Core web project with 4.61 .net version
I created an empty Library with 4.61 .net version
I added the library as a dependency of the web project
I rebuilt the project
I published with web deploy - and got the error
I am using Windows 10
The same happened on a friend computer.
Any help would be greatly appreciated
Thanks
PM

Looks like this is a known issue with a fix forthcoming. The following Github issue page has several workarounds:
https://github.com/dotnet/sdk/issues/543

Related

Visual Studio 2019 where to find WebAssembly template for .net core 3.1

I'm using very latest (16.4.2, dated 8th Jan 2020) Visual Studio 2019.
When I tried to create a Blazor WebAssembly solution, although the description for 'blazor app' included the words 'server or webassembly', when I got to the create page, only Server option was available and it successfully creates Core 3.1 application.
I assumed latest version would be there, so I went to the Visual Studio marketplace website and there were no Blazor extensions to be found, so looking on the internet I found running this command:
dotnet new -i
Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview2.19528.8
(found via Missing visual studio 2019 blazor webassembly app template)
And it worked, I got web assembly option. However, when I look at my project created using WebAssembly it is using .net Core 2.0 and the options only go as far as 2.1. I presumed by the '3.1.0' section in the name it would be the latest.
Any idea how I get the latest template rather than random searching and use .net core 3.1?
If there is a better way, can anyone let me know how to uninstall templates as I failed to find out how.
Run the following in a CLI or in Tools -> Nuget package Manager -> Package Manager Console:
dotnet new --install Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-preview3.20168.3
The NuGet package for above is here.
Get started with ASP.NET Core Blazor here.
Update
The latest release is now an RC and can be installed with the following:
dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-rc1.20223.4
The latest preview release as of April 30th can now be installed with the following:
dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-preview5.20216.8
This requires the latest dotnet core SDK 3.1.201.
To check for the latest preview you can check the ASP.NET blog.

How to create new core 2.0 project?

I've just reinstalled VS 2017 15.6.2 using web installer and tried to create new
empty Asp.net core 2.0 project.
But when i open it i got error:
Project file is incomplete. Expected imports are missing.
My version of SDK is 2.1.101, which was installed with visual studio.
I selected web and .net core development features during install, what am i missing?
I tried to create empty core console app and everything works fine.
UPDATE
this error is related to folder structure
C:\Novatek.Monitoring.WebUI // no errors
C:\Svn\Monitoring\trunk\Novatek.Monitoring.WebUI // Project file is incomplete. Expected imports are missing.
Try follow this tutorial:
https://www.asp.net/get-started
Remember to check your dotnet-core version with 'dotnet --version'
You can follow this simple and basic steps :) This link will help get started in creating your first dynamic ASP.NET Core MVC Web App connected to MS SQL Server.
https://deanilvincent.github.io/2018/01/12/steps-in-creating-simple-but-dynamic-powerful-web-app-using-asp-net-core-mvc-connected-to-a-database/

Exception in executing publishing in VS2013

I have a asp.net web forms template with individual accounts without any modifications. When I try to publish this application to my web server I'm receiving the following error:
Exception in executing Publishing: Cannot load file or assembly 'Microsoft.VisualStudio.Web.Azure.Contracts, Version=2.0.0.0, Culture neutral, PublishKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Has anyone else ever received this error? I'm getting the error message after I right click on my project and select 'publish'. I've done some googling but haven't found any solutions.
I'm not sure if it matters, but the version of VS I'm using is Visual Studio Professional 2013 and my webforms project is .NET 4.5
Any help or direction would be appreciated. Thanks!
You need to install Windows Azure SDK for .NET (VS 2013) by following these steps:
Go to http://www.windowsazure.com/en-us/downloads and on click the
“VS 2013 Install” link under .NET category
Download and install the Windows Azure SDK installer which uses
Microsoft’s WPI (Web Platform Installer)
http://digital.voyage/2014/03/28/exception-in-executing-publishing-error-in-vs2013/

Cannot Access WCF members in Visual Studio 2010 -- Very Strange

In my web application I have added WCF service which is hosted on IIS. It was all working fine until the time windows has installed the update on the my development machine, and now Visual Studio 2010 does not recognize the service reference which I have added previously.
It is giving the error as 'Type Service_Createuser is not defined'
Intellisence does not show the service reference either.
Below are the updates had installed on the machine :
KB2504637 Microsoft .Net Framework 4 Multi-Targeting Pack
Security Update for Microsoft.Net Framework 4.5.1 (KB2901126)
Security Update for Microsoft.Net Framework 4.5.1 (KB2898869)
I have removed the service reference and added again but still the same problem.
Webservice was created using .Net 3.5 and my web application is also set to .Net 3.5.
I have googled in but no luck!
Could someone please tell me what this updates has done. And how to resolve this problem.
Please let me know if you need more information. Any help will be appreciated.
Many Thanks
John

Visual Studio 2010 - Web deployment project includes framework DLLs

I have just upgraded a solution with two web deployment projects from VS 2008 to 2010 (upgrading all the projects to .net 4.0 as I went).
I installed the new VS2010 web deployment projects to allow me to open my old build projects (these build up my web sites, clean up a few files and zip them for upload).
I've got these working again, but when I look at the built files, all the referenced .net framework files (e.g. System.Web.dll etc) have been included in the deployed site. Does anybody know why this might be happening and how to turn it off?
Maybe you are using a component (DLL) which is using that files probably by needing specific file version of some framework libraries. VS will automatically copy dependencies of a dependency.
It seems you're using .Net framework Client profile version. Please check the .Net framework version selected for upgraded projects under Project properties.
Here is the MSDN article on .Net framework client profile:
http://msdn.microsoft.com/en-us/library/cc656912.aspx
One reason could be the Copy Local = True property of the referenced .net framework files.

Resources