asp.net pages can use class library but site won't compile - aspnet-compiler

I am using VS2012 Update 3 and have a solution containing three visual basic projects a class library, a conosole app, and an IIS website.
The website has a reference to the library project. The library compiles fine and automatically places the latest dll in the bin folder of the website.
This was all working without issue before this week.
My web pages are able to import and use the class library. I get proper intellisense and the pages browse or eventually browse showing they are using the library. This week sometimes I get a type not defined error with browsing but after waiting it works. But the compile is always a fail now.
When compiling sometimes the errors show in the error list then eventually disappear but at ALL times when building the errors show up in the output tab as:
SomeCodeBehindFile.aspx.vb(#,#) error BC30002: Type 'SomeTypeInMyLibrary' is not defined.
Error BC30002 - Type XXX is not defined did not help. I tried using fully qualified variable types versus using the import. I tried changing the identity on the app pool to Network Service which has read permission on the whole site.
I've also tried Visual Studio's build > Clean Solution and deleting all files from windows' framework Temporary ASP.NET Files.
The only thing I may have done to irritate VS would have been renaming one of my asp files and its class names/page directive attributes manually but I have done this before without issue. I got paranoid and deleted that file and re-added it also. I also have 3 pages complaining about types not being defined now.

Was really perplexed for awhile. It also got worse with the pages using the library permanently refusing to browse. Though if I copied the library and erroring pages in another web app it would work! Not knowing what went off the rails I started a fresh VB web site and was back in business for awhile but then it started again. I did not connect what I did that actually caused the grief in my 2nd site. For a 3rd time I started a fresh web site this time using C#. Going great again up until that point I kept shooting myself. Thankfully the C# compiler gave a more helpful error message: "A using namespace directive can only be applied to namespaces; 'StaffPlusLibrary' is a type not a namespace". Grrr the problem was I kept adding a help page to the site related to the class library and called the page StaffPlusLibrary.aspx. I am careful not to name pages the same as existing classes but it did not register in my mind I was about to create a page using the same name as my library's root namespace. So the page created a class using the same name as the namespace. The ambiguity I introduced was not apparent until C#.

Related

"ERROR: General failure building project output groups" while creating Set Up project in Visual Studio 2019

I made a Windows Form App for borehole heat exchangers simulation, consisting only of one Form. When trying to build a set up project to install the app, I constantly get an error in the building. Message appears like below, and 4 times each message. All this is using Visual Studio 2019 updated.
ERROR: General failure building project output groups
ERROR: Unrecoverable build error - 0x80004005
I checked that every image used in the app are in the source file, that I have done the building in the right order, but every time I create a project output, no .xml file appears.
Although I think it should be not an issue, the program also created a Form1.resx file that sends a message (not an error, neither a warning) Object reference not set to an instance of an object. I donĀ“t remember creating such thing. I tried to erase it and almost got my app deleted.
Does anybody now what can be the problem and how to fix it?
Mainly my process consisted in building classes that represent different modellings of a borehole heat exchanger. I then made the program build an "borehole" object of the certain class you choose in a ComboBox. I had no fundamentals whatsoever in coding so maybe this is not the way I should do that, maybe it shouldn't be classes. The app works perfectly on debugging mode.
Public Class Modelo2D
Inherits ModeloNTU
Public ReadOnly Property Calor2D As Double
Is there a problem in this?

How to fix "unknown project ID (no ID found ) (Dispatcher API Error: 9)[CR][LF]" error?

I am working on Captiva designer and my flow includes recognition project for Classification.
It was working all fine earlier, however I made one change recently. Just after that, the mentioned error started to show up. I have tried to keep the backup project back in location(which was working fine earlier), however now that also showing the same error now.
unknown project ID (no ID found ) (Dispatcher API Error: 9)[CR][LF]
How to get it fixed?
You need to compile the recognition project after you made the changes.
Without compiling, it might show you as saved, but when you deploy the flow, it might cause the project ID issue. Usually this issue happens when you copy the recognition profile from other environment. So once you copy or modify the existing recognition project, you should go to recognition -> open your project -> compile it and then map it with the flow, using classification setup.

Why do I keep getting 'Assembly must be specified for XAML files that are not part of a project' errors in a local project?

To start with, I would like to stress that I do know how to define XML Namespaces correctly in my XAML files. This repeated error is not caused by an mistake in my code. The problem does not stop my project from being built successfully, or running and the mentioned Converter class works perfectly.
When I build the project, the errors disappear. However, the designer show the familiar error message:
When I click on the 'Reload the designer' link, the errors return. The worst part of this problem is that I lose all Intellisense on these views.
The error highlights these namespaces:
But you can clearly see that they have been declared correctly:
I'm sure that I have found a solution for this problem before, but after an extensive search just now, I can only find a million posts relating to this error where users have actually made errors. Please also note that this was a brand new WPF Application and not downloaded from the internet or a network drive.
Is the project ON a network drive? XAML has issues with projects stored on a network drive. In corporate environments your Documents are often remapped to a network path, causing this problem for the default project folder.
Try like c:\projects\yourprojecthere instead?
WPF Project on a network share with clr-namespace

Deploy a WPF application partially [duplicate]

I am using VS2008 to publish my application files using ClickOnce. I read somewhere that ClickOnce intelligently does only partial updates; meaning it only downloads files from the network share if the file has changed in subsequent updates. However, this wasn't working for me. So I did some research and stumbled upon this MSDN article - http://msdn.microsoft.com/en-us/library/ms404267.aspx. It says that if we build using VS, it doesn't perform the partial updates. Can anyone tell me why this is the case? If so, is there a way to atleast let the referenced dlls to be downloaded only for the first time. I am using Microsoft Practices Enterprise Library and some 3rd party controls (with huge Theme files).
Thanks,
Uniball
Partial updates work fine in ClickOnce even when building in VS. However, if you have a solution made up of a few projects (eg a couple of class library projects and an executable) then any time you rebuild all the projects the timestamp on the assembly files will change, even if the code hasn't. Since ClickOnce really only looks at the timestamps to decide whether a file needs updating, it'll pull down the (unchanged) assemblies as new files when the user updates.
The workaround is to pull any dependent projects out of your executable's solution file and build them separately. That means that any assemblies whose code doesn't change very often will only get pulled down to the client once. If you need to change the assembly, you simply open its solution and make the change, then reopen your executable's solution and rebuild that. The next ClickOnce update will pull down both the exe and the changed assembly.
Hope that's clear enough!

Some problems with basic DotNetNuke localization methods

I'm writing a simple DNN module - using DNN 5.6.1 and currently just working direct in a VB.Net source file within the DesktopModules subfolder of a DNN website.
To localize an error message within the module, I'm trying to use:
Dim baseString As String = Localization.GetString("CoveringErrorMessage", Me.LocalResourceFile)
However, this is currently returning "Nothing". Even though Me.LocalResourceFile seems to point to the correct path - /DesktopModules/MyModule/App_LocalResources/MyModule - where MyModule.ascx.resx resides, and even though "CoveringErrorMessage" is defined.
I've also checked that I can definitely edit the resx files from the Admin Language editor.
Beyond this, I've also got a problem with AddModuleMessage() not showing any message - so I'm wondering if there's some obvious setup step I've missed.
All ideas appreciated - this is just one of those frustrating things at present.
It'll look for CoveringErrorMessage.Text rather than just CoveringErrorMessage. Where there's not a . it adds .Test to the resource key.

Resources