How to Generate *.XmlSerializers.dll in Win Forms Application C# - c#

I am developing a Win Forms with C# in Visual Studio 2012 RC.
The Problem is my project is not creating
example.XmlSerializers.dll
in
*\bin\Debug directory of my project.
This problem occur when i publish the project using Click Once.
What i have done already to get rid of this problem.
In Project's properties Build Tab. i have set Generate Serialization Assembly = ON
In project's properties Publish Tab. I clicked on Application Files Button and select example.XmlSerializers.dll = Include
I have searched on Google but didn't find the satisfactory answer.
Please Help. I am in trouble. How can i get rid of it. I will be very very thankful.

If you build your application, do the dll's show up in the \bin\debug folder? If do, then build the application, then open the Application Files dialog (in the Publish tab of your main project's properties). At the bottom of the screen, check "Show all files". Those dll's should show up. Set them to "Include" and "Required".

I found this link, which helped me sort out the problem.
Seems that the "Publish Now" button has a bug which doesn't include the [application_name].XMLserializers.dll. If you select the "Publish Wizard" button instead, your missing files should be included...

Related

ConfuserEx With Visual Studio Installer Setup Project, Obfuscation not working properly?

I have created single layer windows form application and added one Visual Studio Install Setup Project to create the installation wizard using Visual Studio 2013.
So my application contains one .exe file and number of .dll files (SQLite, EntitiyFramework, etc) and other publish items. I am trying to Obfuscate my code using ConfuserEx.
For that, first I have created the publish build using my Visual Studio 2013.
Using ConfuserEx, obfuscated my publish .exe file. This step was working fine. I tried to decompile the obfuscated .exe file and got the unreadable code files. So that means, the process works fine.
Then I have replaced the obfuscated exe file with release exe file (..\bin\Release\appName.exe).
Then, rebuilt the installer setup project to generate the setup.exe file.
Then I have installed the software using setup.exe. Installation was success.
Decompiled the installed application exe using .NET Reflector 9
Decompiler shows the exact source of my project. So that means something is wrong in the obfuscation process.
Anyone know how to fix this issue?
I find the issue.
I was replacing the ..bin\Release\AppName.exe file instead of ..obj\Release\Appname.exe
Now it is working fine.
Thanks.
I have tried your way, it worked for one time only. I found better and easier way to solve this issue as such:
In the VS installer choose the primary output folder, right click.
Choose exclude filter. form exclude filter window, Choose add
filter.
Write down your program.exe.
Now select your VS installer project, right click.
Choose add File.. Browse toward your confused exe.
After building this, the confused exe will be installed.
It work well with me
I have tried your way, it worked for one time only. I found better and easier way to solve this issue as such:
In the VS installer choose the primary output folder, right click.
Choose exclude filter.
form exclude filter window, Choose add filter.
Write down your program.exe.
Now select your VS installer project, right click.
Choose add File..
Browse toward your confused exe.
After building this, the confused exe will be installed.
Tried and tested all above ways, Failed -> Now look at this way: (A Smaller one)
In the VS installer choose the primary output folder, double click.
Choose your program.exe and remove it. (YES remove it)
Now select your VS installer project, right click.
Choose add File..
Browse toward your confused/obfuscated exe. -> Select it.
After building this, the confused/obfuscated exe will be installed.
the issue in above similar solutions is:
When you exclude the exe it will not include the executable file at all.
So you simply need to remove the exe generated from the project output and replace it with your obfuscated exe.
Thanks.

Files pulled from Git result excluded from the project

I need your help with Visual Studio and Git. I and a friend of mine are working on a simple project written in c#. We share the project with git (the code is on GitHub) but there's something wrong: when I pull his new files (or he pulls mine) the files result excluded from the project. I can see them in the project folder, but not in the Visual Studio Solution Explorer. To see them I have to click on the "Show All Files" at the top of the solution explorer and then they appear, but, as I said, they result excluded (with the dotted border). See the image here below:
This is strange. We have always worked with Git on other platforms (Android Studio, Eclipse, xCode) and this is the first time we encounter this problem. How can we solve it? Thank you in advance,
Sometime you have to add the files manually. Click on the folder in VS and "Add existing item" if your missing files are on the disk.
Equivalently, if some of the source files do not show in the Solution Explorer but do in fact exist in the project folder you can simply drag those files into the Solution Explorer. Following worked for me with VS 2015.
Right click on the project and click on "Open Folder in File Explorer"
Drag the missing file from the File Explorer to the Solution Explorer and drop in the place you want it to be and save solution.
Now it should appear in the project Solution Explorer.

Weird behavior when opening web project in Visual Studio 2012

I have a solution with a web project (the "main" project - lets call it the DataPortal project.) where the project will not open unless take the following steps.
Open solution. The DataPortal project is greyed out and says "Unable to open project".
Right click the DataPortal project node and choose Edit DataPortal.vbproj
Change the UseIIS node in the project from True to False. Save the file.
Right click the DataPortal project and choose Load Project. The project loads.
Now open the DataPortal project files Property page. (Alt-Enter)
Check the option button in the Property sheet that says Use Local IIS Web Server.
Check the checkbox that says Use IIS Express. The Project Url already has a value in it.
Now everything works great. And I can work until I shut down VS but when I re-open the solution I have to go back through it all again.
Can anyone tell me how to fix it so that UseIIS is okay at startup? Is there some way to get insight into the project load error for more information about it?
Maybe you could try to start Visual Studio with the log switch and see if it reports anything.
devenv.exe /log
(/log documentation on msdn)
Also, when Visual Studio behaves strange I usually delete both *proj.user and *.suo files and sometimes it resolves the issue.
Try deleting (or editing) your DataPortal.vbproj.user file. I had this problem a few days ago, and I think that's what I did to solve it. Project settings that aren't team shared (which may include run settings for your web app) are in this file.
Probably you have some problems with IIS port.
Try to diagnose using Fiddler or looking into IIS logs...

I can't see the folders I created in my project

I have been working on a project in C# in Microsoft Visual Studio 2012. Since I have a lot of C# files I decided to put them in a few folders based on their type. For example an interfaces folder and an enumerations folder.
Now when I open my project I can't see any of my folders and all of my C# files are not in folders. I can't open the files because it says that the directory has changed or has been deleted. I am adding a photo so you will be able to see what happened to me.
You should've created the folders and moved the files inside the VS Solution explorer, then everything is tracked automatically.
The easiest way to fix this is to enable "Show all files" at the top of the solution explorer, refresh the view to make sure you can see everything
Then right-click the slightly grayed out folders and choose "Include in project"
Once that's done, delete the "Broken" old files.
Follow the steps to add the files back to the solution
From the Project menu toggle on "Show All Files"
Now you should see the files/folders in Solution Explorer.
Select those you want to include
right click and choose "Include in Project"
after include all files delete the broken file links
Sometimes you have to click "Refresh" in the solution explorer first. Then you will be able to see hidden files, when clicking "Show all files" and you will be able to "include them in project".
sometimes Visual Studio file tree lacks your latest update to solution explorer
so, the solution is to just right click on your solution and select "Sync Namespaces"

Where and how, to find the installer file after creating and adding set up project to a solution having a windows application?

HI,
I have a windows application in C#. I created and added a set up project to this solution. Then, built the solution. I refered to this link http://www.codeproject.com/KB/install/SetupAndDeployment.aspx. I even added the shortcut of "Primary output of my application" to "User's Desktop" folder. But I am not able to find the installer file in Desktop, so that I can "double click" this installer file and install my Windows application.
KINDLY HELP ME WITH THE PROCEDURE THAT NEEDS TO BE FOLLOWED AFTER CREATING A SET UP PROJECT, ADDING IT TO A SOLUTION AND BUILDING THE SOLUTION. WHERE AND HOW TO FIND THE INSTALLER FILE. IS THERE ANYTHING THAT I AM MISSING.
The installer file should be located in the bin folder of your installer project. Right click on the project in the project tree, and select "Open folder in windows explorer", and you'll find the bin directory.
The link on the desktop will only be present once the installer file has been run.
Whether this is 100% applicaple I don't know but it's something I'd think is worth a try which is if u know what the installer file is called why not do a search for that file to see if it's been stored somewhere else?
I apologise If I am stating the obvious to you, I have probably misunderstood your question if i am.
When you make a setup project the built setup files are in the Debug or Release folder of the setup project depending on your build settings
-setup.msi
-setup.exe for example
clicking setup.exe will run the install the application
You copy them to the user's desktop and click to install your application?

Categories

Resources