Identical VS 2022 projects with different publish outcomes - duplicates

I made a project in VS 2022 using vb.net. It worked fine when I ran it from VS (Debug x86 local machine). I published it and it produced a msix upload file with no errors or problems. I then copied the code, xaml and assets to another project with a slightly different name. I ran it from VS and it ran fine, like the original I had copied from. When I published the second (remember, identical copy), it produced hundreds of errors mostly about file names that are the same but sizes are different. I reloaded VS and published again with no other change. This time it produced hundreds of errors of the "System.void not defined" kind, every line of code was an error. It is difficult for me to believe that this is not an error in VS because I did exactly the same thing and got different results. Any thoughs or solutions please?

Related

Error BC30560: 'ReportViewer' is ambiguous in the namespace 'Microsoft.Reporting.WebForms'

I get this error some 23 times when publishing the website. There are no issues with compilation and testing. I know someone is going to have the urge to say "remove the duplicate reference from the web.config" but that's not the problem here. This is a project started in 2008 and the use of ReportViewer predates the code being added to our git repository (which in turn predated me working on it) so I know that nothing is technically wrong with the code. In fact, until last week, it published just fine. What changed? I finally got a newer, faster computer. The client wanted one line removed. I put the code on the new computer, removed the offending line, built, tested. All is ok. Then I went to publish and got the ReportViewer error. I'm working with a byte-for-byte copy of the project on the old computer and the only thing that fails is the publish on the new computer.
Clearly something isn't installed on the new computer that's preventing publish, but I don't have a clue what it is. (Or possibly something installed that shouldn't be. The "new" computer was actually in-use by another developer.)
I was grasping at anything for this problem. I got the idea to remove all copies of the ReportViewer DLL from the Microsoft.ReportViewer.WebForms folder. There were 5 different versions. Windows itself balked when I tried to move version 10. That was my clue. It turns out that whoever switched from version 10 to version 12 missed a couple of source files. I updated the reference to version 12 and the problems cleared up.
Now the real mystery is: why did it ever work on the old computer?

Converting .exe to VS solution file / project

I've recently had an issue at work where I have lost my solution files to my projects, but I still have the executables that have been produced by the projects / solution. It has been collection of 50+ webforms.
I have tried some de-compiler tools like ILSpy, JustComplie and .Net Reflector but everything gives source code in different format (not originally written by me) and also not designs of forms.
Is there any possibility to decompiling the executable back into a solution/project file?
I don't think that you can actually decompile the executables to a solution structure as seen on VS.
Although you can decompile the executable files (there are decompilers on the net that can perofrm the operation for you - only the decompilation),
you need to re-create the solution manually and add the source files you have retrieved from the previous operation.
Furthermore, if your files were obfuscated this makes it harder for them to be decompiled.
Even if this works, be prepared to do some debugging and check references/dependencies.
There is a Decompiler that works very well for .Net applications called DNSpy.
Here is link to the Project :
https://github.com/0xd4d/dnSpy
After you have decompiled you can start debugging and such from this application.
Hope this help.

Access 2013 Runtime - Some weird issues (Form doesn't show up at one computer but doesn't on another)

Lately I am having some very weird problems and I can't exactly pin out what is causing it.
I've got an Access frontend application which uses SQL Server linked tables. A few days ago I deployed a new ACCDE version which caused some very weird problems.
At one computer I was unable to open a form from the Ribbon (some 21~ ish error can't exactly remember but it was a default open-form error). After some investigation I found out that the problem is caused by an allow additions = false line on the on-open event of the form. This however is very strange since it has always been there. Besides that, at almost every other computer, including mine, it just works fine while the code (and forms, queries, etc.) are exactly the same..
When trying to open the same access file in accdb at that specific computer it does seem to work (opening being done with runtime version).
So as workaround (for the time being) we made sure that that this computer opened the file as accdb while the others (where it did work) opened it as accdde.
Today however it went wrong again but on a different computer and a different issue. Now a completely other form doesn't load it's data (it's empty). Testing it locally it works fine however and testing it yet again on another computer (with also a runtime version) it also opens fine with data in it...
The weird thing is when using an older file (a few application versions back) just works fine but the current one doesn't, at least not on all computers. This makes me believe that the file is corrupted but the weird thing is, why DOES it work on some other computers? If the file would be corrupted you would say that it is causing the issues on all the computers?
So the next thing I thought of was different Access runtime versions. I tested 4 computers (two where everything works fine) and the other 2 have issues.
Computer one (which works fine) is a 32 bit system with Access runtime version 15.0.4841
Computer two (with issues) is a 64 bit system with Access runtime version 15.0.4569
Computer three (also with issues) is a 32 bit system with Access runtime version 15.0.4833
Computer four (my own computer tested against a local db) is a 64 bit system with Access runtime version 15.0.4849
So the computers where the Access file doesn't work all have a lower version than the ones that do work, is it possible that this is causing the problem?? If it is, I still wonder why the older Access application file works on all computers but the current one doesn't..
On a side note:
Also tried to repair the access runtime version on one of the computer where it didn't worked but this had no effect
Doing a Compact & repair on the Access file itself also doesn't have any effect
Well, you plain and simple cannot run an x32 accDE database with the x64 bit runtime – it simply will not work.
And if the runtime versions are different on those target machines then you want to un-install the runtime, and download the latest version. Windows update will NOT update the runtime. With runtime 2010, you had to download + install runtime, and then ALSO download an update to the runtime.
With 2013, then the latest download of the runtime will always include the latest SP updates.
Attempting to run Access with different runtimes will in general be a disaster. And in the case of attempting to use the x64 bit runtime on an application compiled to x32 will not work at all.
I would also before you compile to an accDE check and remove any and all references not required. So references to word, excel or anything else should be removed and late binding should be used.
Regardless, you want to ensure that all computers are using the same runtime version, and this includes the bit size. So in all cases you want to ensure and use the x32 bit runtime, and then ensure that all machines are running the same version/revision of the runtime.

Changes To xaml don't reflect on App Until rebuild - windows phone

I have a weird problem in an windows phone 8 project (Visual Studio Express for windows phone 8) that Changes to xaml( ex:change visibility of control) don't reflect on App until I rebuild the project and deploy it again to emulator or device.
The changes reflect normally in the design window of visual studio but didn't reflect on the running App.
I did many researches and they didn't help, like:
1- Change "Build and Run" to "always build" when projects are out of date.
2- I checked configuration manager as This post suggests but it was selected.
I have the exact same issue. I have a work around at the moment to save the hassle of rebuilding the solution because rebuilding deletes and re-installs the app and changes any saved settings you've made while debugging. The work around is to switch between configurations. So I'll execute the app in Debug, make some changes, then the next time I execute I change config to Release, and the changes are there.
The difference I can see is when it works I can see the Build Output line which says "Updating the application as the manifest file has changed..." take a few moments to complete. When this issue occurs the output line appears for a split second and so you can tell the incremental deployment hasn't actually been deployed to the device/emulator.
This is a little frustrating so hopefully someone has a real answer. I have other projects on the same machine and they don't have this issue. Just the one project so I don't think its a VS2012 problem.
I've also tried suggestions from other sites saying delete bin and obj folders but that didn't work.
I had the same issue for some of my WP8 Silverlight projects in VS 2013. I couldn't understand why it happened only for some projects but not all, but eventually I found this forum thread. The solution is the following: if the name of your app includes spaces, you definitely need to remove them or replace say with the underscore char. This recipe helped to recover my 'problem' projects.
I also noticed that numbers at the beginning of app name cause the same problem. I solved it by removing numbers from solution and app name.

Why isn't FlashBuilder building with updated code?

I am using FlashBuilder for a project (Actionscript Project, using AS3) that I've been working on for a few weeks now. I took a break for the holidays (naturally), and when I came back, the compiler seemed to stop working. Everytime I ran the default Actionscript application, the swf ran without my new changes.
According to the file system, the swf had been modified (though my SVN software, Cornerstone, detects no difference in the file). But, if I add in a trace statement in the constructor of the default application, it is not displayed in the console while running in debug mode (even though all other statements that were written and saved before today run fine).
I have tried Project->Clean several times. I also have changes the compiler arguments to generate a size report, however, I have another swf that is generated on build (a preloader) and the size report only includes that (even though it does modify the main swf. This even happens after a clean and it MUST generate a new main swf and preloader swf).
I have also restarted FlashBuilder, and the computer, and moved the project to a different computer, all with the same result (build not including updated code)
Any other ideas to get rid of this strange behavior?
Thanks in advance,
-Esa