Can't get rid of old folder in application bundle - ios

Seems to be similar to this question:
Xcode won't let go a resource file
But for Xamarin. I have a xamarin solution I'm working on in Visual Studio for iOS. I added some resources in one place and then later decided to move them somewhere else. But when I build the project and look at the application bundle on our build Mac the originals are still there. Even though I scrubbed every instance of them from my Windows machine it somehow still ending up in the application bundle!
How do I complete scrub any cached traces? I've reset the simulator, cleaned and rebuilt from visual studio, even deleted the bin and obj but I can't get rid of the damn things.

I had a similar problem with files I've deleted from VS still being included in the bundle when running the app.
I followed the output from The Mac Server log and you can see from there where the files are being copied from, in my case
/Library/Caches/Xamarin/mtbs/builds/[App_Name]
Delete your application folder in that cache and it will fix the issues.

Related

What is the purpose of "building" a .NET MVC application if it runs fine without it?

I have a simple MVC Web application in the .NET Framework. To run it, I can click the green arrow ("play" button) in Visual Studio, which does a "build" and starts a Web browser pointing to the application.
Or, I can just start up IIS Express with the proper command line options, and navigate to localhost:8080 in a browser and run the application without a "build".
What is the purpose of "building" the application in Visual Studio if it runs fine without it?
The simple answer is that it doesn't run without the build step; your assumptions are wrong.
However, Visual Studio continuously monitors your source files and compiles them, e.g. to be able to show intellisense suggestions and compiler errors while you type. This means that there are in fact compiled binaries based on your source somewhere, maybe just not in the bin folder under your project root (that somewhere might be in memory, or in some cache location on disk, depending on circumstances out of scope for this question).
It's also very likely that you've previously built your application, resulting in binaries in your bin folder, even if you didn't do it with the purpose of running the application right after. In either case, if you get it working with IIS Express it's because it can find compiled binaries somewhere, and run those.
The main reason to have Visual Studio explicitly rebuild your app when you hit play, is to make sure that you're running the latest version of your code. Sure, it takes a few extra seconds every time you start the debugger, but it's nothing compared to the time you'd lose trying to track down a bug that you've already fixed in your code, but which still manifests in the running application, because the running application is an outdated version. (It also makes things like stepping through the code much less confusing, since, again, the source code on file will always be in sync with the running application.)

Monogame: "could not load fbx model asset as a non-content file"

I recently changed operating systems on my laptop (went from 8.1 to Windows 7). I transferred my game project, and after having to rebuild it (due to Visual Studio 2013 stating it cannot open my project file), I managed to get it to run, but as soon as the code tries to load my cube.fbx model, I get the error in the title.
My settings for the model are as follows:
And the code for loading (which worked flawlessly before the transfer) is as follows:
modelCube = content.Load<Model>("Models/cube");
I have no idea what the issue is. All help points to setting the Build Action to "Content" and the Copy to Output Directory to "Always". The only clue I can think of is that originally, my project was made for Android, and on this iteration I remade it as a normal Windows project (as for whatever reason, I couldn't get an Android project to work this time).
Thanks in advance. This is really confusing.
While I doubt anyone else will have this problem, I figured out the issue. I think Monogame changed the way it loaded assets since the last time I used it. With my install of a newer version, I just had to follow the link below to get it working again.
http://rbwhitaker.wikidot.com/monogame-managing-content

Unable to copy file, Access to the path is denied again and again and again

I kept having this annoying thing stop me from building my project over and over again even though I searched for years on stackoverflow trying to find solution but none of those I tried works. The problem just kept coming back!
The file having problem is system.web.mvc.xml, wont let me delete even I am the administrator.
Im running MVC 5 projects.
tried to close vs 2012 first then delete files : fine for the next build but then it came back after 1 or 2 builds
tried to un-check read-only option to my entire project folder : fine for the next try but , you know.
tried to close and re-open : same as above
tried to run administrator : same as above
So anyone have really get rid of this? like ever?
Same with me..
Finally I did this trick and work for me:
Close The Solution - Close Visual Studio. And Reopen Visual Studio and solution
Copy System.Web.Mvc.dll from bin folder to new fresh empty folder, I make Lib folder under solution.
Remove read only at the dll
Remove System.Web.Mvc from project reference
Re-add System.Web.Mvc.dll (the dll copied at Lib folder)
__
Hope This Help
Regards

Compiling an Xcode project from a network folder

I'm trying to compile an iOS project in xcode from a network folder and I get all sorts of issues, most of them about files not being found on the first build command.
Most of the time it just says it hasn't found the headers inside other headers. If I hit Build again, the previous errors go away and new ones appear. Other times it just says "xxx.h" Resource temporarily unavailable. Hitting build again, ofcourse that is available but some other header is now unavailable, and it just makes things very frustrating.
PS: I am connected to a network folder from a Windows System using SMB. Sometimes if I disconnect, and reconnect to the network folder it briefly works flawlessly for like 3 seconds, and then starts spewing off resource unavailable errors. Unfortunately my build process lasts longer than 3 seconds :|.
UPDATE : It seems like the cause was disk access latency. I am running an OS X Virtual Machine and connecting to my real machine's HDD. I have now moved the entire VM to an SSD drive and everything works much smoother and it seems I don't have these issues anymore, so disk access times make all the difference :).
UPDATE 2 : For some reason I'm getting this error again. No idea what changed the situation.
Seems like it could be referenced files that aren't copied to project folder. I have lots of projects that are located on a server resource and as long as all the resources used by the project are included in the project it works fine.
That said, my personal choice these days is to house all of my projects in Dropbox. Still have to be careful of forgetting to copy any added files into the project folder, but it is lots easier for me to manage working on these apps on the various machines I work from.
In my experience, trying to work with an Xcode project that resides on a network share is completely hopeless. As you say, all sorts of random errors, some of the time, but not all the time. I simply have a "special" folder on the Mac that is instead shared to the OTHER machines on my network, and anytime I want to work on an Xcode project, I copy the project over into that "local" folder (and back when done). Highly inefficient and error-prone, but in my experience the only thing that works reliably (pretty sad really!)

XNA 4.0 ClickOnce game does not run after installation

Okay, I have been looking all over to solve this problem before I actually broke down and decided to finally ask for my psecific problem. I am using ClickOnce installation and when I use the setup.exe to install nothing runs, not even on my personal computer that I know has all of the proper libraries and such. I'm not sure what I am doing wrong so it is difficult to explain the problem.
I have included dotNetFramework4.0 client x86 x64 , xna redistributable 4.0 and windows installer 3.1 along with my game and I have it set to install all of that with setup , also I have it set to download prereqs from same location as application. I've tried it on three separate computers , one that does not have XNA or VS C# installed and the same problem occurs.
Here is the problem , after I install the game nothing runs, I try clicking on the ClickOnce application file (the one with my game's icon image) and again nothing happens. The thing that really bugs me is that there isn't any errors or crashes or anything , it's almost like clicking on the desktop screen. (I looked at the properties of the "shortcut" that was installed with the game and the file size of the shortcut is like 300 bytes. Isn't that really small? I was thinking maybe there is a problem with a startup executable? I'm not sure though.)
I've tried tweaking some stuff in the Publish section of my project , such as un-checking the box that says "use .deploy extension files" (I don't know why, I've been grasping at straws here) I've been looking into some other installers such as NSIS but I don't know how to compile a list of files to include in other installers and I feel like that won't solve the problem anyway because I've gotten ClickOnce to work with me before.
On one computer there was an error report that said something about 'deployment and application do not have matching security zones.'
Game.application resulted in exception. Following failure messages were detected:
+ Deployment and application do not have matching security zones.
It's getting late so if I need to provide more information let me know.
ClickOnce can be a fickle thing. There are times that I've had errors occur that could only be solved by recreating an entire Windows user profile. Because there are so many different options for ClickOnce, it's going to be hard for me to diagnose your exact issue, so I can only offer what options I used to successfully install via ClickOnce.
Publishing Folder: local folder
Installation Folder URL: blank
Install Mode: offline
Application Files
Make sure the Publish Status of your game files is set to Include (Auto)
Make sure the Publish Status of the XNA libraries is set to Prerequisite (Auto)
Click Prerequisites
Microsoft .NET Framework 4 Client Profile
Microsoft XNA Framework Redistributable 4.0
Windows Installer 3.1
Do not check for updates
Everything else default under Options (publisher/suite name shouldn't affect anything)
Specify the version number
Publish Now
Install the game through the setup.exe provided in the publish location. I always distribute every file that is publishes. However, you can clean up old versions in the "Application Files" folder if you don't want the history to be distributed.
You can double check the "Application Files" folder to see if your version got published correctly (look at the files that were deployed and see if they match your project contents).

Resources