question

Pasc059-3466 avatar image
0 Votes"
Pasc059-3466 asked brunovalli commented

output path ignored with .net 5 C# classes lib

Hello,

I updated a .net framwework project (a library of windows forms controls in C#) to .net 5. Eveything seems ok except that the ouput path of the buid, specified in the project properties, is ignored. For instance, for the Debug config the ouput path is always 'bin\Debug\net5.0-windows' and 'bin\Release\net5.0-windows' for the Release config. I don't want vs2019ce (version 16.8.3) add/create the folder 'net5.0-windows'.

Is this a bug?

regards

windows-forms
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

olegra avatar image
0 Votes"
olegra answered brunovalli commented

@Pasc059-3466 If you use the new .csproj format (and most probably you do so) just add these lines into the project file:


 <PropertyGroup>
   <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
   <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
 </PropertyGroup>

See more details here (in the Note section).




· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Are there plans to expose this to the UI?

0 Votes 0 ·
Pasc059-3466 avatar image
0 Votes"
Pasc059-3466 answered

Hi,
thank you Oleg, after inserting the lines you mentioned in the csproj file, this works as i want. Without specifying an output path, the defaults outputs are \bin\Debug and [bin\Release for respectively the Debug and Release configurations, which suits to me.

Regards
Pascal

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.