I have written a WPF/C# desktop application with a standard setup project. When the application is installed, an sqlite database is placed locally on the users file system. Now, I have renamed my app and I want to rename the database as well. I have renamed the database file in the solution explorer (the corresponding file in project folder is automatically renamed) and on the File System tab of the setup project. However, the name of the database under the setup project in the solution explorer is not changed.
I am not sure whether this really matters, Source path and TargetName for the setup project database has the new name and everything seems to work. But i figure it could be confusing for someone else with dirrerent names for the same database, and I worry it could lead to some problem I cant foresee.
Does anyone know how to solve this?
Maybe you can edit it directly from the project file, if i remember correctly its an xml
Related
I have a corrupted Publish profile.
I need to delete it. My other computer is fine, so I know it is local.
I have tried:
Clean checkout of codebase from Git (so nothing is local in my code directories).
Deleting C:/Users/<user>/AppData/Local/VisualStudio
Deleting C:/Users/<user>/AppData/Roaming/VisualStudio
Full text search of Profile Name 'MunicipalAgenda' through Registry
Full Text search through machine.
Creation of a new Windows User for Visual Studio Development.
Despite all of this, VS.NET is hanging onto that corrupted Publish profile.
Honestly I am at wits' end, and my next drastic step is to do a fresh reinstall of Windows 10. Please help before it comes to that!!!
Normally any publish profile store in particular project.
For that you have to look at following location.
Go to that project.
Project has special folder call Properties
Inside that there is a folder called PublishProfiles ( Something similar)
I also had some difficulty in getting my profile deletions to stick ... Visual Studio (2017) doesn't seem to be able to do it from Solution Explorer.
My latest attempt is to go to Source Control Explorer, open up the /Properties/PublishProfiles folder, and delete and commit the unwanted profiles from there. So far so good :)
I'm developing an asp.net application atm and it will be used to insert some data in a database.
Yesterday, I noticed that I've written the wrong table name in one of my insert statements. Ofc I changed it then, but..!
After getting the same "Unknown Column" exception again and again, I opened the SQL Profiler today and looked at the statement. The statement still tries to insert into the wrong table, but not in the "new" right one, which I've actually written in the code.
Why is the application not noticing changes? I tried to load the website without cache by hitting STRG+F5 for like 125392 times. I also deleted the cache folder, also without success.
Thanks in advance!
Edit: U may want to know that this application is running on a server. Therefore I need to edit the .cs-Files with Notepad because there is no Visual Studio installed on this server.
Are you sure this is running as a website project and not a web application?
If it's running as a website project then editing the .cs files should be picked up. The quickest way to check this would be to introduce a deliberate syntax error to prevent a class from compiling.
Web application projects are compiled before deployment. If there's a .cs file in the web folder for that then it's been deployed by a quick copy-paste rather than a proper publish from Visual Studio and, while the site should work just fine, changes to the .cs files will be ignored. As that's a compiled project you'd need to make the changes somewhere that has access to a compiler (ideally VS on your usual dev machine but I think you could use the command line compiler), then deploy those changes - ideally via a publish to leave the project in a clearer state for the next maintainer :-) If you have to do it manually for whatever reason though, remember you need the .aspx/.ashx etc or .cshtml / .vhbtml files and the DLLs.
.cs files need to be compiled for changes to be added to running library. It is not recommended to edit files directly on the server.
Good evening!
Here is the thing, i've been trying to create a setup project for my app which includes some winforms and a SQL Compact Data Base.
I already added to my VS 2012 the required installation to create install shield installers for my apps, i add it to my project and i follow the instructions.
Once im asked to add the required files to their destination computer paths i add on the install directory the interface final results and to a C:\ folder, the data base final results. I of course changed the database connection to that new folder.
I proceed to generate the installation and then use it on my own computer, everything goes smooth, and once it finishes, i launch the app, it works okay, but upon opening a form which has a datagridview inside of it (or i click a button that has a connection with the database) i get an error messagge telling me that the db files could not be found.
I go to the database folder and it is there, but it doesnt work, the thing is, if i go to my VS 2012 projects folder, open the DataBase project folder and i copy the database inside of it (.sdf file) and i paste it in the new folder for the program, the app works just fine.
Any suggestions? what am i doing wrong?
I am working on an ASP.NET project which is published to a configured IIS in the same machine.
I have made changes in one of the forms and than published it.
But while the changes on the web from file (.aspx) are being updated - other changes which reside in the code behind file (.aspx.cs) are not being updated.
My aim is to search addresses from a database and to display markers on google map.
Everything is working fine from my VS-IDE execution but after publishing it to the local IIS:
The front end is working fine while the back-end (the related .aspx.cs) does not work.
I tried those steps to remedy the situation:
I have deleted app directory from windows/frameworks/4.0/temp files.
I have even made new profile in publish wizard and published the project from a new folder.
I have deleted pool from IIS and made new one and mapped it to new ddl files folder.
I have also gone to project /properties/publish web/items to deploy and set to all files in the project.
But none of that solved the problem........
I am using
VS 2012
SQL Server 2012
EF 4.5
Do a clean and rebuild, then publish. Sometimes, sometimes, a change to a dll won't be detected and so won't be recompiled.
Try to delete everything in the bin directory wherever you're publishing the site, then try to publish again. Sometimes VS doesn't like to overwrite the dlls when publishing.
This is very late but search brought me here. The solution that worked for me was, in Visual Studio:
In solution explorer, right click on your project -> select "Build Dependencies", remove any incorrect dependencies.
In solution explorer, go to Project -> References, remove any unnecessary references.
Make sure your project is selected in solution explorer, on PROJECT top menu, select "Convert to Web Application." Ok.
Clean and Rebuild your project.
Publish. It helps to set your File Publish option in Publish Profile to "Delete All Existing Files Prior to Publish"
The code behind files do not get uploaded, because they don't need to get uploaded. Only config and markup files. All the project code is contained in your project's DLL file in the BIN folder.
Hope this helps somebody out there.
I've searched extensively and I followed loads of advice (pretty much all saying the same thing) with regards to this problem, but it still won't work.
I'm building a C# graphing application using Zedgraph, and using an SQLite database. I was still tweaking the DB until recently but now it's correct and I want to add it as a resource to my project, so that when I publish my Project, it's be part of the setup and will work with my application. I've added the resource the way one usually does it, and it's in my resources folder in the project. I have it set to Copy Always and it's as an embedded resource. I'm not sure if this is correct though. My application builds and runs fine from VS. But when I publish, it can't find my tables as the DB file is obviously missing.
How can I get the DB file working with the application so that I can distribute my app?
Thanks.
Are you using a Visual Studio Installer Project? If yes, it might be that the file is not being included in the installer file. You can force-add it from the Dependencies in that project.
Check this one out for adding external files.