VS2008 / TFS Build 3.5 / Ent Lib 4.1
I have a rather large solution that contains several apps. They are all currently using Enterprise Library (v.4.1) for their data access layer.
I added and locally tested a new data access layer that uses LINQ to SQL- it was fast and easy to add and the test went fine. But...
When I checked in the project, it would not complete the build - I get a "Partially Succeeded". There are some warnings, but those exact same warnings were there prior to the build failing.
I took the data access class back out (along with the code that calls it) and rebuilt and it builds fine.
I then added an empty new class and put a single variable in it and referenced it from the code. That built. I then created a new LINQ to SQL class in that new project and did not even reference it. When I checked that in, the build failed again with the "Partially Succeeded" message. No extra errors or warnings.
I love LINQ to SQL, I have used it in a few projects outside of this system, but I now have many hours into attempting to get this to build with no success.
Are all the same tools/libraries installed on the build server as on your desktop - Perhaps the server doesn't have the same vs or .net service pack level? Try running the build "manually" on the build server - load up the solution in Visual Studio on the server and execute the build within the IDE rather than under the TFS build system - this may report problems that you don't see so easily in the automated build.
Check the build log. Visual Studio often reports errors in the output pane text or build-server log text that are not picked up by the GUI error windows. So you will think a build succeeded but an output file has "quietly" not been generated. TFS build logs are usually huge so they are a pain to work through, so start by searching for keywords like "error" or the name of the project that fails rather than trying to read through line by line.
OK, we found it. The issue is on stack overflow elsewhere at
Visual Studio Setup and Deployment build fails with no errors
The issue is a bug in MS setup and deploy that breaks when it hits a line in the project that uses Linq. You have to comment out a line in the project to get it to work. Amazing, ridiculous, and no surprise.
Thanks for the input, it was that input that helped us get to the eventual answer (already on StackOverflow, but didn't have Linq in the title).
Related
Recently i am trying to developing n-tier asp.net mvc application using Entity Framework with MySQL as the backend database. I wanted to use latest EntityFramework ie 6.9.9.0 version, so i downloaded sqlconnector package through "Nuget package Installer". These are the libraries that it installed for me:
mysql.data.dll(ver. 6.9.9.0)
mysql.data.entity.EF6(ver 6.9.9.0)
But i could not successfully create .edmx file for my project. During the final steps of creation of .edmx , it ends in the error. Here are the steps I applied:
1) first I selected '.net framework database provider' for mysql as in screenshot
2)Then I clicked 'next' button as in the screenshot
3)Finally i selected the tables for the database that i want to import in the entity data model before i click 'finish'
4) Click on "finish" button pops up "null object reference" error.
closing the error dialog displays the "add entity model" dialog again
The process creates a blank .edmx file with not a single DB tables on it.Also I find no errors in visual studio error list at the bottom of the window.
Could anyone share insight on what could be the possible issues here, i am really stuck at the first step of code my application and has already spent almost whole day searching for solution over the internet. I personally tried many alternatives seeking for solution too, but no luck so far. Anyone's help would be truly appreciated.
Thank you.
I somehow sensed that I am not using the right version of
EF tools for Visual Studio 2013
with corresponding version of MYSQL server installation and mysqlconnector for .net. So i downloaded and compared several versions of EF tools, MYSQL installer and MYSQL(Nuget package) for entity framework and finally found the right combination as follows:
Entity Framework 6.1.3 tools for Visual Studio 2013
MYSQL-installer-community-5.6.32.0.msi (you can find archived mysql
version in google)
MYSQL(Nuget package) for entity framework like in the screen shot below:
As it worked for me , i think mysql.data dll version and mysqlconnector for net that comes with MYSQL installer should match , i have them highlighted here in picture:
After the proper installation ,i finally got EDMX diagram loaded fully and correctly upon creating one.
P.S: after every un-installation of MYSQL server version that did not work for me, I used the useful tool (Advanced_Uninstaller11.exe) to clean all left out registry entries and here is the download link for the tool
enter link description here
I Hope that I have explained it clearly of the problem and its resolution. I could not make any of the above points or scenario clear, hope you would comment on it and i would try to explain more and better.
And Thank you #ErikEJ for your continued support on the problem.
I have a packge that was completing succesfully without throwing errors when executed. But it is not implementing the logic. The data is not flowing. Even the control flow is also not getting implemented. The execution results shows everything got validated.
But it is throwing following warning message.
BIDS Helper had problems highlighting expressions and configurations: Object reference not sent to an instance of object.
Can anyone please suggest me what could be the reason for this.
BIDS Helper is an Add-In - you can disable it temporarily from the Visual Studio menu: Tools / Add-In Manager.
If that avoids your issue, then I would check if you have the latest version of BIDS Helper installed.
So, I'm trying to get set up my MySQL and ASP.NET.
Currently, I have both Visual Studio 2013 and Visual Studio 2015 installed on my PC. I used this installer for MySQL (Basically one that comes with everything you need to get started, including MySQL For Visual studio): MySQL Installer
Anyways, as a quick test I made a new ASP.NET MVC project, connected to the database in the server browser (which works just fine!). However, I then tried to create an ADO.NET model from it. When I come to the step of generating the model from the database, I get this error/exception:
This happens in both Visual Studio 2013 and Visual Studio 2015.
I have tried to search my way out of this (I've also tried with different databases, I used some of the sample databases included with the MySQL server installed, still got the same error), but I don't seem to be able to find much information on it. Additionally, it might be worth noting that when I select the version of the Entity Framework to use, I get this:
Which seems odd as I'd think the newest MySQL installer did actually include MySQL for Visual Studio which supports EF 6.x?
Anyways, any assistance or hints on this problem will be much appreciated :)
EDIT - Narrowed down the problem a bit
So, I found out that this problem occours whenever I have a database with foreign keys in. Still no clue why, but databases without them I can easily generate!
Try to run this command on MySQL WorkBench:
set global optimizer_switch='derived_merge=off'
Good luck!
If you have many schema inyour database, the Global parameter is not your solution.
test with : set session optimizer_switch='derived_merge=off' to impact your schema and not the entire base
We have developed Custom SSIS components that integrates with an online REST API (Shopify to be precise) and these components work fine in BIDS and every single time too. However, when I create a SQL Server Agent job for the SSIS package that uses the components, some of the components don’t work, there is no error, just never hits the Pre Execute. The components that don’t work call the REST API and set specific TAGS on some orders, they do so using a JSON. The SQL Server agent is running on the same machine (my own) and it's executing the same SSIS package that works in BIDS. There are no errors and the SQL Server JOB reports success.
My machine is a 64 bit setup, so obviously the Agent will be running in 64bit so there may be issues there.
This is what I have tried already
Changed the SQL Server Agent user to eliminate the issue being a proxy/user issue.
Changed the setting for the step to use 32bit runtime (Ticked “Use 32 bit runtime”)
I have tried compiling my code using Any CPU x86 x64 .. with different results but none of them work etc
The installation project (which is part of the solution) is a WIX Toolset project which can only compile using x86 which I don’t think I can change.
Logged where it is getting to a log file.
I think it might be 32bit/64bit issue but maybe wrong. The log file shows the following
When called from BIDS (works)
• Validate (code running as 32bit)
• Validate (code running as 32bit)
• Hits Pre Execute and it all works thereafter
When called from SQL Server Agent (doesn’t work)
• Validate (code running as 32bit)
• Validate (code running as 64bit)
• Never hits the Pre Execute
Like I said, I suspect it being a 64bit issue but maybe wrong.
Hi guys and sorry for not posting the answer.
First of all thank you for all your help, especially Nick McDermaid as you kept trying and trying. I really appreciated your pointers and without them I wouldn't have solved it ( kind of solved it :o) ).
My SSIS Custom components only work when I have a "Success path" coming out of them. This was only an issue on this particular occasion because it was the last component called in my Data Flow.
This could be down to a bug in my SSIS Custom Component but I am sure I have had this issue with other components in the past (I think it might have been the 'Send Mail Task').
If anyone comes across this issue again then I would love to hear from them.
I'm currently fire fighting at work so hadn't had a chance to look at the SSIS Custom Components again.
Once again, thanks for the help I received.
I realize this question is very old, but I thought I'd put in my answer. I just ran into this very issue and the answer was that the SSIS engine didn't see the custom component doing anything so it removed the component at runtime. I was able to get around this by changing the RunInOptimizedMode property of the Control Flow object to False. After this I was able to run the SSIS package as a SQL Agent job.
If you run the package through dtexec.exe as bilinkc suggested in your comments, it should give you messages that make it obvious if this is occurring.
------ Clean started: Project: DataService, Configuration: Debug Any CPU ------
O/R Designer validation failed for file: a.dbml
O/R Designer validation failed for file: b.dbml
O/R Designer validation failed for file: c.dbml
O/R Designer validation failed for file: d.dbml
O/R Designer validation failed for file: e.dbml
O/R Designer validation failed for file: f.dbml
Error: The operation could not be completed. Unspecified error
This error is intermittent. Sometimes the clean is fine, sometimes this happens.
I'm running VS2008 version 9.0.30729.1 SP - 64bit.
Is there some way I can disable the O/R designer's validation or otherwise stop this from occuring?
I had to close Visual Studio and reopen it. Solved this for me. In another case I had to roll back my DBML file, then close Visual Studio, and reopen it.
Looks like a bug for Microsoft to fix.
I had also the same problem, but the following procedure let VS always compile the code correctly:
Close VS
delete all files in the obj\x86 (and eventually x64)\Debug (and Release)\ directory
Then start VS again via command line using
<Path>\devenv.exe /ResetSkipPkgs (optionally: <Name>.sln to open directly the correct project)
(Not sure whether the /ResetSkipPkgs is necessary, but another article told so. I made a small batch script which does all of this automatically).
The code should compile now without any problems!
For reference, my script file looks like this:
del /Q C:\[...]\[...]\obj\x86\Debug\*.*
"C:\Programme (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /ResetSkipPkgs C:\[...]\[...]\<Name>.sln
(I always develop in debug mode, thus I only delete the matching x86\Debug directory...)
This problem appeared after I copied a property in a table. For some reason the copied property had the same storage name. Deleting this storage attribute in dbml xml for those copied properties solved the issue.
So the source of this problem is most likely some error in the dbml file. If you have version control, check what you changed and maybe you'll spot the error.
vs2010 was giving me this error while vs2017 was building it fine,
running vs2010 with /ResetSkipPkgs (Andre's answer) solved for me.
I solved moving a table around in the .dbml designer (so basically not changing anything), saving and rebuilding the project.
VS2017 was giving this error for one of my DBML files, and was preventing me from successfully building the project. None of these answers worked for me. Things I tried were:
(1. Check csproj file for any inconsistencies such as missing item groups or appended numbers on filenames
2. Running devenv.exe /ResetSkipPkgs
3. Deleting visual studio temporary files)
This error was driving me crazy as the error visual studio shows is very cryptic. My eventual solution was to open the problematic DBML in design mode, and delete every stored procedure (I left the tables). Ran a build and the error stopped generating. Then I simply re added all the stored procedures back to the DBML, and that seemed to have done the trick.
So far, deleting and re-adding the dbml file is the only thing that has worked for me.