Error The type or namespace name 'name of my tables' could not be found()are you missing a ussing directive or an assembly refrence?) - subsonic

I get this error (The type or namespace name 'name of my tables' could not be found()are you missing a ussing directive or an assembly refrence?)) in Context.cs file when i compile my ASP.NET MVC2 Web Application. I follow these guide http://subsonicproject.com/docs/Setting_up_SubSonic_3.0 but i cant solve this problem.

I have seen this error after I made customizations to SQLServer.ttinclude to include only certain tables, but for which I forgot to make corresponding changes in ActiveRecord.tt. If you are just setting up and have made no modifications, probably you are not seeing the error for the same reason. But maybe try reloading your .tt and .ttinclude files from the SubSonic distribution so you are sure you didn't accidentally modify them (other than setting connection string etc.).

Related

What causes the "Schema Conflict when Loading a File" in Revit?

When I open a Revit file, I get an error titled "Schema Conflict when Loading a File". The schema conflict is with my own schema. What could be different between the two schemas that could cause this error?
The full text of the error is:
Schema Conflict when Loading a File
The file being loaded is causing a conflict with existing data in the
model. What do you want to do?
The file contains data of schema "XYZ" (from "ABC"), which has the
same ID as a different schema already in memory. If the file is
loaded, the existing data will be erased from the model.
For End Users
If you are getting this error and did not develop a Revit add-in, forward this page to the developer. It will help them figure out what is going wrong.
For Developers
This error happens if the schema in the two projects are not exactly the same. If you are getting this error, something is different, and you need to dig deeper to figure out what it is.
In my case, the difference was the Application GUID I was using. For unrelated reasons, I changed this value in my project, not realizing it was going to cause problems for my schema.
Get the schema using Schema.Lookup and use the debugger to examine all the settings in it. Keep looking because you will eventually find something different.
Try using the The ExtensibleStorageUtility sample from the Revit SDK. It is helpful as written for getting a handle on what's going on with your schema. It is also a good platform to build from to dig deeper into their structure.

nameSpace error in XPages

This morning the error happened. I have no idea why?
ERROR DETAILS: Description Resource Path Location Type
The unknown namespace tag bx:select2PickerCombo cannot be used as a control, as the namespace http://www.openntf.org/xsp/bootstrap is not known. xspFrmSta.xsp fileName.nsf/XPages line 680 XPages Problem
Any suggestion is appreciated.
Ensure whichever extension library the bx prefix relates to is installed on that install of Domino Designer. If it's not, Designer won't be able to compile (to convert the XML in your XPage to the relevant Java classes).
Build automatically has been disabled then whole project was cleaned up and built
now it works great.

Script error: Object does not support property or method in MFC

I just created a simple MFC dialog based application in VS2005. Whenever I am trying to add variable to an edit control I am getting this error.
I am new in MFC. Please help me fix this :(
Using: C++98 with VS2005
Did you add any variable(control/value) to any of your control and fortunately you deleted it?
If so, you have to remove the ID for control in resources.h and app.rc and also variable initialized in .h files and used in your cpp files.
It may also cause this problem. But im not sure.

How to fix SPFeatureDefinition does not contain a definition for RootDirectory

I'm very new to SharePoint development, and I'm just trying to add an XML file to a Feature to reference the XML file content in the feature Event Receiver.
It seems that the general recommendation is to use do so like in this SO question:
How to retrieve data from an XML file in a Sharepoint 2010 Feature Event Receiver?
However, my code does not compile when I reference the RootDirectory property. The error I see is below
'Microsoft.SharePoint.Administration.SPFeatureDefinition' does not contain a definition for 'RootDirectory' and no extension method 'RootDirectory' accepting a first argument of type 'Microsoft.SharePoint.Administration.SPFeatureDefinition' could be found (are you missing a using directive or an assembly reference?
Now, the weird part is that while debugging, I am able to evaluate the RootDirectory property correctly in the Quick Debug window.
Am I missing something obvious? Like I said, I'm completely new to SharePoint.
My feature is scoped to the Web level, and I do have a reference to Microsoft.Sharepoint.Administration in my using statements.
Any help is greatly appreciated, thanks.
It was indeed something very basic.
The solution/project was set as Sandboxed. Just going to the properties of the project (not the property pages but hitting F4 while the project is selected on Solution Explorer) and setting Sandboxed to false will let you compile when you're accessing the RootDirectory solution in code.
Also, a few other properties/method not show up when the solution is Sandboxed instead of marked as a Farm solution.

Subsonic 3 not generating classes

I followed the 3 step procedure 20 times on 3 different sytems under all possible conditions and no matter what I do it won't generate the classes. I keep getting the following error:
Loading the include file 'SQLServer.ttinclude' returned a null or
empty string. The transformation will not be run.
Any ideas?
I have tried all the solution I found on google but no luck. So I decided to dig into this issue. As you can see, the error tell that generator can not load the include file "SQLServer.ttinclude" although the include file exists. If it can not read include file, why don't we include content of SQLServer.ttinclude instead of including file ?
Copy content of SQLServer.ttinclude to all *.tt as below steps:
Make sure that you have follow this instruction on Subsonic homepage first [link text][1]
[1]: http://subsonicproject.com/docs/Using_ActiveRecord
For each .tt file:
Delete <## include file="SQLServer.ttinclude" #>
Copy and paste content of SQLServer.ttinclude to the end of .tt files
Right click on .tt files -> Run custom tool. The *.cs files will be generated. Compile now !!!!
A little funny thing that I've noticed: After doing above steps and get *.cs file generated. You can simply copy and paste template files again into your solution explorer exact the instruction in [link text][1] and the *.cs file generated without doing any tricks !!!
Hope this helps.
Hai
Try adding the .tt and .ttinclude files to the VS project via Right click -> Add -> Existing Item, rather than dragging the files into VS. Seemed to make the difference for me.
Check the rights associated with the credentials used to authenticate access to the database. You need dbo access for the entity classes to be generated.

Resources