Im not very used to the whole Sharepoint-thing, but usually I just simply deploy my visual studio stuffs as a wsp-package and then deploys it using PS (if I dont remember incorrect)..
Now this time I wanted to update the masterpage of my site, and add a few javascript files and update an existing javascript file.. and this time for some reason the deploy did update the allready existing javascript-file, but it didnt add the new javascriptfiles..and it didnt update the masterpage for some reason.. and I have dubble-checked that the package Im depolying contains the new files and the updated masterpage, I also checked the Elements.xml-file for the javascript files and they are there.. Any ideas?
Check if you files are customized from definition (in SharePoint Designer they will have an (i) symbol. If so - revert them to definition and try to deactivate the feature again.
Related
This is a cache issue I guess. Let me explain,
I have a .net6 blazor project (client server and shared project) which as a referenced project call ReactorBlazorMapbox (Razor library), which is in charge with JsInterop to play with mapbox js.
Code in progress, but works great yet. Display a map, display popup...
The ReactorBlazorMapbox project has its own JS file, called MapboxInterop.js. This file is loaded in ./_content/ReactorBlazorMapbox/MapboxInterop.js
This way, no need to reference the file in the client projet. It's embeded. Great.
My problem is, when I modify this file, nothing happend. Clear cache CTRL-F5, manualy clearing cache using inpector/Application/Cache/Delete (or local/session storage). I also removed bin/obj, clean solution, re generate projects on C# side.
My MapboxInterop.js in the browser does not refresh. (using inspector/Source)
I had to rename it MapboxInterop2.js and change my link in the import, this way it works. At least one time. But add a new file each time modification is done in this file will be time killer...
I found a work around, instead of using a embeded js interopt file from the side project, I put this one in the Blazor Client /wwwwroot/js path and add this line :
//load js from client projet path
_Module = await _JsRuntime.InvokeAsync<IJSObjectReference>("import", "./js/MapboxInterop.js");
instead of
//load js from this project
_Module = await _JsRuntime.InvokeAsync<IJSObjectReference>("import", "./_content/ReactorBlazorMapbox/MapboxInterop2.js");
this way, when re running the site with VS2022, the file in cache is refreshed.
If someone has an idea so the same thing happen for a embed project js...
FCK me :)
I forgot to check "disable cache" checkbox in the browser inspector.
But, there is a cache difference between those two files. (client vs project)...
I built a custom theme for DNN several months ago using the Christoc templates for Visual Studio. I needed to make a small HTML adjustment today so I re-opened the solution and made the change but when I rebuilt the project, I get several build errors, presumably because it no longer recognizes my DNN dll:
The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?)
I checked my C:\path_to\dnndev.me\bin\DotNetNuke.dll and it's still there so I'm not sure why Visual Studio isn't seeing it.
When I built the skin originally, I was running DNN 9.1.1 but have since upgraded to 9.3.2. Could that be causing my issue?
I read elsewhere that I could be building on the incorrect version of .NET framework but I don't know what version to use for DNN 9.3.2 so I tried several different version with no change in results.
How can I solve this issue?
UPDATE:
Per the answer here, I rebuilt with .NET 4.7.2 and it did not solve my issue.
UPDATE 2:
Okay, so the small change I made was adding another layout page like the Home.ascx and Edit.ascx files that come with the template. If I remove the new layout files, the project builds fine.
What could I be doing wrong when adding a new layout?
What you read about the .Net framework version is correct. You need to 4.7.2.
The problem was a new layout I had created. I right clicked on the project and selected Add > New Item and chose Web Forms User Control. This was the wrong way to add a new layout.
I successfully added it by copy/pasting one of the template's pre-existing layouts and renaming it. The project builds fine now.
Ah, now I understand what went wrong. Adding a Web (Forms) User Control is not completely wrong, as a skin (or theme) is a kind of Web User Control, and has the same extension (.ascx).
What you have to do is deleting the code behind file (.ascx.vb or .ascx.cs), and change the first line of the ascx file to
<%# Control language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
(But copying another skin file is also a good solution as propably you have most of the references to the skin object already there)
Running under Server08 | IIS7. I have a website project and am in the habit of hand editing the Global.asax.cs at the deployed site many times in the past. Recently I've found that only the Global.asax is present and has only:
<%# Application Codebehind="Global.asax.cs" Inherits="myDomain.MvcApplication" Language="C#" %>
There are simply no Global.asax.cs files present/visible for any of my active, functioning websites anymore.
I've checked here Global.asax can't find code-behind class and here where is the codes in Global.asax in mvc3? without getting anywhere. The second link contains the comment: 'That's because it's a compiled web application. You'll have to view it in Visual Studio as a project.'
But since my project has always been a website - and I've not converted it (intentionally) I'm puzzled by the changed behavior.
But when i step into VS12 and look at the context menu for the solution's WebProject it presents 'Convert to Web Application'. The sites' folder structures do not contain App_Data or App_Start. To my mind, these 2 fact establish at VS is treating the project as a website, why then, is the Global.cs compiled down to the /bin?
I'll close by repeating - I've hand edited these things in the past - I'm not positive but it's probably accurate to say that this is the first time I've tried to do so after installing VS12. And, coming to think on it harder - it's only recently that I've implemented the 'One Click Publishing' service so that could be coming into play.
verify? I'd like I need to edit a simple update without full re-deployment.
thx
I think the 'One Click Publishing' is most likely the culprit here. I created a sample Web Site project to experiment, and when I use the publish feature in Visual Studio, the files generated are indeed missing the Global.asax.cs file. Instead, a bin folder is created with a compilation called "App_global.asax.dll" even though it is a Web Site and not a Web Application. I am guessing this might be similar to what is happening for you as well.
If not, I found a link which might be useful to you in order to once again be able to edit a class on the server. Particularly, have a look at the second answer (the one not accepted as the best answer) to recreate a class file for the global code: Where is the Global.asax.cs file?
I tried this solution, and verified that the class file is editable on the server, and that it is dynamically compiled at run time (the modifications I made to the file worked immediately).
Hope this helps!
After editing the global.asax you need to rebuild and upload the DLL to the bin folder. Otherwise, your changes will not take effect.
You might be able to upload an web version of the global.asax that includes the code in that one file, which obviously does not require a .cs code behind. I used to do it with aspx files in an application but I have never tried it in the GLobal.asax file.
This is crazy, but I can't seem to get all my views/content/scripts published when I publish the site. This seems to happen, I believe, when the view or content is not directly referenced by my project, but used by another assembly in my project. So I might have:
ExternalAssembly.dll referenced (it gets published)
I'll need ExternalLogin.cshtml in my main project, under my views folder
ExternalLogin.cshtml doesn't get published
Right now I have a script that copies everything in the Views folder and dumps it to where I want it deployed, but VS should do this for me. What am I doing wrong?
When you click on one if these files what is the build action for it on the properties? Content....or? Set to content.
So your views files are in another project or folder outside your current project? Normally the files have to exist in the web site project, in it's views folder, not externally, and the build action should be set to Content and not to copy to the output folder. But there are some workarounds:
Duplicate them in to your site views folder and make sure they are marked content (as stated in another answer). One thing to note though is that you can add them as "Linked Files" in visual studio which actually allows them to exist in two places in the hierarchy without having to exist in two places on disk: http://support.microsoft.com/kb/306234
If you have control over the external library, you can compile them in as embedded resources or use Razor Generator or something similar and use a custom view engine to return them: How can I make ASP.NET MVC 3 use views (aspx, ascx) files from an external assembly in my website?
Manually put the copies in the .csproj build XML using the Copy task: http://msdn.microsoft.com/en-us/library/3e54c37h.aspx (Note that this will make it work in visual studio doing essentially what you are doing now, as it will then be part of the Visual Studio build if you add it to the AfterBuild target or something)
I have written a couple of t4 templates for EF4, I want to get other developers to use them, so id like to make them installable in VS so that people cna jsut add them to their projects.
I have no idea how to do this. Any idea about where i should start reading? Idid a quick google and had no luck.
Thanks.
An alternative is to create a VS item template.
There is an export template wizard accessed vie the File/ExportTemplate menu.
After you've exported a T4 template, you'll probably want to manually edit the resultign item, as it doesn't handle the generated file well by default.
You'll have your template from the wizard as a zip file.
Unzip this and remove the generated file.
Then edit the Foo.vstemplate file and remove the line referencing the generated file.
Finally zip the files up again.
Your colleagues can just drop this zip file into their user templates directory:
C:\Users\\Documents\Visual Studio 2010\Templates\ItemTemplates
For external sharing, your best bet is probably to create a nuget package.
Have a look at this link:
http://haacked.com/archive/2011/01/12/uploading-packages-to-the-nuget-gallery.aspx