Resolved publish project to .exe without manifest files

etl2016

Active member
Joined
Jun 29, 2016
Messages
38
Programming Experience
3-5
hi

I have project of type Console .net framework 4.6.1. A simple hello world. No dependencies. No references.

When I right click and try publishing this project, it goes into manifest mode of publishing. Where do I change settings to make it a traditional simpler Publish, so I get a .exe file without manifest files. So that, the Publish folder can be copy pasted to any computer and it runs without issues.

Some research suggested to uncheck LINKER, but this is not available in Projects --> Properties --> Configuration

thank you
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
1,831
Location
Chesapeake, VA
Programming Experience
10+
Can you share your .CSPROJ file?

Or you could try going into your Properties/PublishProfiles directory and delete everything and try publishing again. Make sure you exit Visual Studio first before you do this.
 

etl2016

Active member
Joined
Jun 29, 2016
Messages
38
Programming Experience
3-5
thank you

There is just AssemblyInformation file under properties. One more observation made is after Project --> Publish is done, there is key.pfx file noticed in the solution

Also, as you suggested, i removed everything under Properties and re-published. No change seen in Publish Wizard, its again Manifest mode of publishing (Diskpath, file share, FTP server options seen. No profiles.)

thank you
 

Sheepings

Senior Programmer
Staff member
Joined
Sep 5, 2018
Messages
1,572
Location
UK
Programming Experience
10+
The file he wanted to see. You need to go to your project folder in explorer and post the contents of your proj file. See selected file as Example :
Screenshot_170.jpg

@Skydiver I think OP is getting click once but wants a build or release exe file instead of whats being output by publishing?
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
1,831
Location
Chesapeake, VA
Programming Experience
10+
Also, as you suggested, i removed everything under Properties and re-published.
No I did not. I said:
you could try going into your Properties/PublishProfiles directory and delete everything
If you were publishing like before without a manifest file, the there would have been a PublishProfiles directory under the Properties directory, hence: "Properties/PublishProfiles".

By deleting all your files in your Properties directory, you would have likely lost your assembly information, settings wrapper files, and potentially some localizable resources.
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
1,831
Location
Chesapeake, VA
Programming Experience
10+
@Skydiver I think OP is getting click once but wants a build or release exe file instead of whats being output by publishing?
Very likely true.

Update after: Yup. It looks like VS2019 now defaults the Publish menu for .NET Framework to be for ClickOnce. I get the same wizard asking about how to publish.
 

Sheepings

Senior Programmer
Staff member
Joined
Sep 5, 2018
Messages
1,572
Location
UK
Programming Experience
10+
Also, as you suggested, i removed everything under Properties and re-published.
As you can see; that's not what was suggested @etl2016.
That was a very rash action to take without question. And I would just like to give you some advice when taking advice from anybody on a open forum, and that is to never delete anything unless you are certain you know what you are being told to delete and more importantly you should be asking why delete. I also hope you made a backup of whatever files you did remove, because they may need to be restored. Which brings me full circle. Backup whatever you do plan to delete encase it needs restoring later.
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
1,831
Location
Chesapeake, VA
Programming Experience
10+
As @Sheepings was saying, if all you need is to get your final release binaries, set our build target to "Release", and just collect all the files in the "bin\Release" directory for XCOPY deployment. That's for .NET Framework console projects.

For .NET Core console projects, publishing should generate a publish folder with all the binaries you need for XCOPY deployment.
 

etl2016

Active member
Joined
Jun 29, 2016
Messages
38
Programming Experience
3-5
thank you both.

Signing, Security features of the project properties resolved it, when disabled their Clickone feature. thanks.
 

Sheepings

Senior Programmer
Staff member
Joined
Sep 5, 2018
Messages
1,572
Location
UK
Programming Experience
10+
You're welcome. I thought that was it.
 
Top Bottom