dotnet / dotnet/msbuild

ClickOnce deployment goes rogue after upgrading to .Net Framework 4.8

Open
#5,485 2 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

I upgraded a project from .Net Framework 4.7.1 to .Net Framework 4.8, and **ClickOnce** stopped working. It deploys, but it is no longer generating all of the files, and it is no longer respecting the path of the content files. I appreciate any idea you may have to fix this issue, thanks in advance.

Here is the side by side comparison
![image](https://user-images.githubusercontent.com/385958/86511946-9c820980-bdcb-11ea-98fc-daf59470ad44.png)

## Sample repository to reproduce
[Here](https://github.com/cilerler/issue.microsoft_msbuild_5485) is a link for sample repositories.

## Initial steps
1. Open a `DeveloperCMD` or `Developer Powershell`
2. Change the location to the application folder's location. For me, it is `cd ~\Source\github\cilerler\issue.microsoft_msbuild_5485`

## ProjectReference method
1. Run the command `MSBuild app.xml -p:BuildId=1` to generate initial output. It will produce a publish folder at `.\artifacts\publish`.

## PackageReference method
1. Run the command `MSBuild library.xml -p:BuildId=1` to generate version 0.0.0.1 of the NUPKG file. It will place it in the folder at `.\artifacts\packages` which project is set up to look for as a local NuGet service.

2. Change the snippet below

```xml

{705ccf76-2c45-43d3-a839-7591813b5522}
ClassLibrary1

```

with the snippet below

```xml

0.0.0.1
analyzers;build

```

in **ConsoleApp1.csproj**

## ClassLibrary.csproj

```xml
...


true
PreserveNewest





6.0.2
contentFiles;analyzers


...

```

## NuSpec file

```xml


ClassLibrary1
0.0.0.1
DotNetDeveloper
DotNetDeveloper
false
Package Description



















```

## Side notes

1. Don't forget to delete the cache from `~\.nuget\packages\classlibrary1` before you build the **ConsoleApp1.csproj** each time. _(**library.xml** takes care of it, you only have to do it manually if you are using VS directly)_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.