I am new to Visual Studio 2019 and I am having a bit of a problem with my CSS stylesheet location. I am using the Peachpie.App NuGet and everything works perfectly when I run the Debug (F5) with the correct stylesheet being used but if I run the compiled application executable I loose all of the CSS formatting. I assume I have got the style.css file in the wrong location for the compiling process to pick it up but I don't know how to resolve that, can anyone provide some advice on this?
Thanks,
Gerry
I manually copied the style.css file to the "\bin\Release\net5.0\wwwroot" directory and it resolved the problem but I should have expected that that would have been down during the Build process.
Related
All my colleagues work on Visual Studio (me too before one week), but I switched to Rider. After setup my project I setup file watcher to compile SCSS to CSS.
But I have weird issue when I change something in my SCSS file everything compiles to CSS file, but my page stays the same and doesn't get newly created code from CSS. In Visual Studio we use web compiler and it works great: after any change browser refreshes and get new code.
What do I need to do to use file watcher like web compiler? I really like Rider and didn't want to go back to Visual Studio.
My Eclipse project uses Sass. When running in debug mode, sass:watch (configured per this article) correctly polls for changes to *.scss files, compiles them into CSS and places them in the target directory. However, these changes are not reflected on the page, and inspecting the page using Chrome developer tools shows the new CSS is not picked up.
Using another (CSS-only) project works as expected: any change to CSS is copied to target directory, and a refresh of the page reflects the proper change.
I ran across a similar issue someone had using LESS. Unlike that situation, though, even changing the target CSS directly, the change is not reflected in the browser.
I can't be the only person debugging Sass/CSS in Eclipse, but I can't find any info on this problem.
Any ideas on how to fix this?
EDIT: SCSS is being compiled to CSS and copied to the target build directory, but not into the Tomcat deployment where the code is running. As I've said, this is not an issue with CSS-based projects, only with this where it's a compiled file.
Solved the problem...
An entry needed to be added to Eclipse’s Web Deployment Assembly so that Eclipse would see this dynamically-generated folder and associate it with the project.
The files were being generated to the local_repo/target/branch_name directory, where branch_name was dynamic, and dependent upon what branch you were working on; this made it impossible to create a static entry in Eclipse WDA for us.
Our solution was to have Maven (1) create a sass-generated/css directory under local_repo/target, and (2) copy the css over into the branch_name/static directory where it belongs.
Now, when debugging locally and running Sass Watch, changes to *.scss files are detected, compiled to css, and deployed to the sass-generated/css directory. Since this dir is associated with the project in Eclipse WDA, Eclipse sees the change and deploys it to Tomcat as expected!
I have an ASP.NET webforms project that I checked in to Visual Studio Online today. Unfortunately, now when I run the project my stylesheets no longer load.
I have checked all files from the solution into visual studio online. Should I have not checked in the .css files? Also, I have tried checking everything out then running the project to the same effect of the stylesheets not loading.
Thanks in advance for your help.
These two things are only coincidentally related. VSO has no effect on the ability of your project to load style sheets. And yes,'you should check them in.
Tye most likely issue is that the path to the style sheets has changed. If you moved the whole solution around then you may have to fix the paths if they are not relative..
Can you check:
1) that the css files exist and are where you think they should be
2) that the style reference points to the correct relative path of those files
I'm working on a project directly on a FTP server (normally I work locally). I use Visual studio to edit and compile my LESS files. When the LESS file is compiled to css, the site wont' update to the newest css rules. When I manually save the css file the changes become visible.
Does anybody know what the issue is here? I haven't got a clue.
I have recently upgraded to VS2012 and have a small issue. All our sass files are checked into source control and the corresponding css file gets generated when the project is built (the css file is never part of source control). with VS2012, as soon as i edit the sass file, a css file is created under the sass file (nested under it) and the project file is checked out. I do not want this as we don't need to check in the css file.
Is there an option i can set to avoid this ? Had a quick look under tools ->options but didnt see anything
The only plugin we have installed is Mindscape Web Workbench free version.
Thank you for any advice.
So the Web Workbench plugin was automatically modifying the project file and including the following under my scss files. This was still present even when i disabled and removed the plugin. There's no option to disable this function in Web Workbench, so i wont be using it anymore.
<Compile>True</Compile>
<Minify>True</Minify>
<CompileStyle>Nested</CompileStyle>
<DebugInfo>False</DebugInfo>
Using SassyStudio now which is nice and simple.Has the option to disable auto css creation and project adding etc.
Hope this explanation can help someone else.