Images in sub folder not deploying - asp.net-core

I have a folder containing image files in wwwroot/images. Web Publish has stopped deploying them.
They're added to the project. They're in source control. But the build has stopped deploying them. Not happened before.
How do I make this software do what it's supposed to do?

The project file had accumulated some junk. For example, it had an odd selection of files as 'Content' and it was removing the images and adding them back not as content.
I deleted all of it. Mwahahaha.

Related

In VStudio 2019, VB, .NET-5: for a ClickOnce installed app, how do I locate the application's data directory at runtime?

My VStudio is 2019 Community, the application is an old VB Windows/Forms app being brought forward from .Net-3.5-ish to .Net-5.
Under .Net-4.8 or earlier, using the namespace System.Deployment.Application, one could access ApplicationDeployment.DataDirectory to locate that artificially-generated directory in \Users\Username\AppData\Local\Apps\2.0\... that a 1-click installation would create and populate with data files from the Project Build/Publish.
Under .Net-5, I believe that particular set of functions has been taken out - yet the ClickOnce installer still places Data files there. How do I programmatically locate that directory? The Application Path can be located from System.AppContext.BaseDirectory, but that doesn't help in locating the data.
This app, an old bit of VB code, has a large number of application data files that need to be installed along with the code. As there are more than 40 of them, we've kept them in their own \Data directory, which is included in the Project, is under Git control to keep their versions aligned with their code...
In an uninstalled app, we could keep this \Data directory adjacent to the executable, and find it easily at runtime: but with a ClickOnce installed app, that falls apart. In the Publish configuration, all the data files are identified, with Group=Required, Publish Status=DataFile.
Can I either:
Easily configure the 1-click installer to place our \Data directory and its contents into one of the standard \Local\Appname or \Roaming\Appname directories that seem to also get created, but left empty? Those can easily be located at runtime.
Easily construct at runtime the path to that obscure data directory that 1-click normally creates and uses for data?
Cheers, and Thanks! Bob

'Resources' is not a member of 'WTApp.My'

I get this error and I can't start my application or edit it.
I've tried deleting the Resources folder and putting everything back and it doesn't help. I also checked my 'Resources.resx' custom tool namespace, and it's fine (uses "My.Resources").
I've tried deleting my images by moving them. It's as if the resx file is hidden from VB.
I really have no idea where to go from here :(
enter image description here
Application resources are added to Resources.resx file. It create a static property against each added resource while file are stored in a Resources folder physically on the file system however, they are embedded into application on compilation depending.
Because you have deleted the resources(images most likely) from Resources folder but application (Resources.resx) is still referencing to these files.
There are two ways to fix it.
1- Go to application resources TAB and delete all the resources & Added the back.
OR
2- Put all the resources into Resources directory. select all and include them (because you had deleted them once so, they may still present in the directory but are not included in project). if you do not see in folder(from visual studio then make sure to click show All Files button on the solution explorer.
This shows how to go to Resources TAB
This shows how to include resources which already exists in the folder (got deleted)

Files removed from Xcode project, but still available in game

My cocos2d-iphone project has tiled maps (.tmx files along with .png textures).
Recently, I deleted all the .png textures in my project (in Xcode, you hit the delete key and then choose to send to trash).
Then, I ran the project, and it tried to load up the CCTMXTiledMap. I was expected it to crash (there shouldn't be any textures in the project, anyway), but it didn't. In fact, it ran just fine, and the maps did load. No idea why - is Xcode keeping some kind of reference to such files somehow?
I checked the .tmx file, and this is the line that defines the source image:
<image source="myMap-hd.png" width="973" height="1024"/>
There definitely is no myMap-hd.png nor myMap.png file in my project folder. Not even Xcode's search toolbar shows it!
Oh, and I also cleaned the project.
As I wrote in question's comment. Problem was not in your Xcode project. Deleted resource files will most likely be still available on device/simulator if you had run application with these resources previously. The reason is that Xcode doesn't track files that are in application bundle, they're just simply copied. That's why they land in Copy Bundle Resources build phase.
You should delete application from device/simulator and run it again. Or if you have precious data already in application, you could navigate to application bundle and delete file manually. Files won't appear again.
In the simulator, iOS Simulator (menu item) > Reset Content and Settings. Clean your project, then run again. Same thing happens without cocos2D.
I've found this to be an issue when nib files are automagically loaded, and while not in the referenced files seem to still be loaded (or attempted). Can cause some brain pain bc the files don't appear in the Xcode IDE though they do exist in the file system.

libcocos2d libraries.a & PROJNAME.app missing

I have this new project created via the cocos2d 1.0.1 template in Xcode and I was copying over files from the project whose cocos2d engine is outdated (it's dated to 99.4, but it didn't have a CCSpriteBatchNode, instead using CCSpriteSheet) and I was rearrange files around into folders that matched the setup of the old file.
One of the folders is Products, which I stuck in the 'Code' folder. However, the two files within this Products folder have gone red:
MyGame.app
libcocos2d libraries.a
meaning they're undefined, and I need help solving this conundrum, I'm very new to paths and directories. Here's a screenshot:
http://i207.photobucket.com/albums/bb289/teh_Mac/Screenshot2011-12-21at90907PM.png
After you created the new project, you should only add source code files and resource files to your project. There's no need to recreate the Products folder.
Besides, the .app and .a are files that are created during the build process. Until you've made a successful build, they will remain in red. And even if the build was successful they may remain red due to bugs in Xcode.

adding jpegs to vb.net application

i am using itextsharp and creating a PDF with images.
currently the images i am using in the application are on my desktop, but i will need to make an installation file that will put the images in a specified directory on the users computer and be able to call them from the specific directory.
how do i include pictures with my build?
how do i reference the pictures? currently i am using:
Dim jpeg3 As Image = Image.GetInstance(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\2.jpg")
How and where do you add the pictures?
If you simply added them to the project as if they were code files (using "add existing item"), then check the Properties for the file in the solution explorer (Build Action, and Copy To Output Directory are useful), and also the Application Files button/window (under the project settings -> Publish). This is useful for distributing the files along with the application (for both debug and release), deployed in a specific sub-directory.
If you added the files to the project's resource file, you can use them using the My.Resources namespace.