locked
CTP4 - Publish Fails with no useful error messages (v10.2.11213.0) RRS feed

  • Question

  • Hi guys, I have made a bunch of changes to my database model, some refactoring, removing fields from tables etc and when coming to deploy I am getting a very unhelpful -

    An error occurred during deployment plan generation. Deployment cannot continue.

    The script file could not be found

     

    The Creating publish preview had a tick next to it but the file it produced was empty (and the file DeploymentReport_77.txt actually doesn't exist in the bin folder - which could explain it)

    Create database script has a red cross next to it.

    There doesn't seem to be any other output information that I can use to help work out the problem here.

    Any help asap would be massively appreciated. Thanks

    Wednesday, January 18, 2012 11:14 AM

Answers

  • Good question.  The codebase for VS 2010 and VS 2012 are *mostly* identical.  As you can image there is some shell-unique code in either platform, but we're using conditionals to verify we maintain a single codebase.  The project types won't need an upgrade process when opening in VS 2012.  You will be able to have a mixed team of VS 2010 users and VS 2012 users.

    Gert Drapers has made it our commitment that we'll stay on whatever platform a majority of our customers are on.  For the forseeable future all web releases will be delivered to VS2010 and VS2012 simultaneously.

    Thursday, July 19, 2012 3:23 PM
  • Removing the .dbmdl file worked for me. Cheers
    Tuesday, July 31, 2012 10:05 PM

All replies

  • Further to this, compare does seem to work which may help me limp my way through this. However this also errors with
    Comparison succeeded, but error(s) building deployment plan
    There is a new output called Compare Scheme - blah which lists
    Finished loading source schema.
    Finished loading target schema.
    Generate Script completed in 00:00:40.7349602 with 1 errors, 0 warnings and 0 messages.
    However no mention of what the actual error was.
    Please give us back some stack trace output for these cases to at least give me some idea where the problem might be.
    I'll continue to provide updates to this ticket.
    Massively appreciate any suggestions or comments
    Wednesday, January 18, 2012 11:22 AM
  • Rerunning Compare and ignoring all object types except views resulted in a different error

    "Errors occurred. Check the error list for more details."

    the error list showed

    "Modification operation was performed on a deleted element"

    But it doesn't tell me which element or how to find the element that it is talking about.

    MS generally please improve the error messages here. When dealing with large databases with lots of object changes we need to know specific object names on all errors that relate to objects

    Wednesday, January 18, 2012 11:32 AM
  • I've tried a number of things now and most interestingly I've found that I can't even publish to a new database with the same error, so it isn't an aspect of the refactoring or change code, it is something to do with the model itself that can't deploy.
    Wednesday, January 18, 2012 2:08 PM
  • The issue is now resolved but I'm not entirely sure if I did anything to fix it.

    It may have been related to either a UDF defined as a default on a table column (that simply returned a value from an extended property) or some computed columns that I'd marked as persisted and was then using as modularisation for some check constraints.

    I did remove both of these and the issue went away - however I put them back (virtually the same) and it continued to work. Shortly afterwards my vs2010 instance (integrated shell, not full vs2010) crashed without error message so I rebooted and haven't had the same problem since.

    It was either due to a memory problem (I have been lumbered with a 32 bit OS...) or something to do with the above. Hopefully this is useful to someone in future.

    However the error messages are inadequate - if I had more directed error messages I may be in a better position to tell if it was a memory issue or something I did but as I was forced to trial and error under time pressure it meant a less tracable troubleshooting process.

    Hopefully someone from MS can confirm that these types of error messages (described above) will have more information in the release - it will help your support staff if nothing else, so likely a worthwhile investment!

    Wednesday, January 18, 2012 4:18 PM
  • Getting this again today. Exactly the same even get the error on generate script going to a non-existant local database.

    Tried a system restart this time first thing and didn't solve it, so it is something to do with the project somehow.

    Any debugging tips or suggestions from MS to help me would be welcomed!

    Thursday, January 19, 2012 3:53 PM
  • So went through painfully removing files in the project (painful as show all files doesn't work for integrated IDE)

    Removed all SP's etc that depend on the bunch of tables that I was working on. Publish (non existant) still errored with unhelpful error.

    Removed the bunch of tables that I was working on. Publish succeeded.

    I then added back the files one by one until I was back in the same position as I was - publish continued to work.

    So, either there is some residue somewhere that is causing the error (which I suspect) or there is some external factor on my machine that just happens to occur. Both times I resolved the issue I fiddled with the tables that I thought were the problem until the problem went away and then returned them to how they were before and the problem didn't return.

    I'd really appreciate some help from MS on this. I've spent several hours trying to work through this problem now and I suspect I will get it again unless it is a known issue and has been fixed (in which case there may be a quicker workaround than I've found so far) otherwise I need to know how I can protect myself against these errors in future.

    Thursday, January 19, 2012 4:48 PM
  • Brett,

    Do you have reproducible step so we can repeat your problem? I can have somebody look at this, but first we need something to look at.

     


    -GertD @ www.sqlproj.com
    Friday, January 20, 2012 6:06 AM
    Answerer
  • Thanks Gert

    It isn't reproducable with the error message that I get, both times have occurred after some table changes to check constraints / persisted computed columns but like I say I can put the exact same code after the issue has cleared back and the publish then works.

    The error that I'm getting could be improved, I think that is probably the best thing that could be done right now in the applicateion. Currently it is akin to "An unexpected error has occurred) - if I had a better error message I might be able to get more clues and be able to repro the condition that causes it or provide you guys with at least the stack trace of the issue to help us work out the cause.

    Equally, I don't know enough about the publish process to help narrow down the possibilities of what might cause it - I'm a little in the dark, but someone who does might be able to suggest the cause - better troubleshooting methods and / or other steps to try if it recurs.

    Friday, January 20, 2012 8:46 AM
  • Hi Brett,

    Are you still experiencing this issue?  If so, please pass on any additional detail repro information and the actual error message string.

    Thanks,

    Janet Yeilding

    Tuesday, February 21, 2012 12:39 AM
  • Hi Janet, I have resolved the issue as detailed in my detailed steps above - however I have nothing further to add and have no idea what caused it

    The real problem is that the error provided no information (it is in my original post). "An error occurred during deployment plan generation. Deployment cannot continue."

    In the absence of a repro it would be great if the error reporting code could be strengthened in the production version to provide deeper information on the problem rather than "An Error Occurred..."

    Thanks

    Tuesday, February 21, 2012 2:19 PM
  • Am getting this again this morning again after changing some check constraints and persisted computed columns. This is with RTM version.

    Again simply get error "Cannot generate deployment plan" - this must be the error that RTM now gives. This happened initially with the compare tool being run (and I remember that this was the case in the past cases also). It also failed during publish from the IDE

    However interestingly SqlPackage.exe did allow the deploy from the dacpac and the build did create the correct scripts. This implies to me that the issue is related to the IDE rather than the compare itself

    I tried a clean and a rebuild but this didn't clear the error. I also tried a restart of vs.

    I then tried removing the folders again that contain the majority of my database objects (schema and database dependent) [1]. This allowed the compare to then complete without the error. Adding them back in created the error again.

    I then removed the tables that I'd recently modified check constraints and persisted columns on and all their dependencies, then added back one by one. Again, this solved the issue

    In light of the above further information Someone in MS who understands the difference in the operation between sqlpackage.exe publish and the Vs IDE compare publish may be able to suggest other avenues. I still haven't ruled out memory issues and I have tried pulling over the few tables that seem to be related to the issue and changing the check/computed definitions but I can't repro the issue, I just know that it continues to happen in RTM and that the error message is not useful to diagnose the issue. I'd be grateful for other suggestions of things to try when this happens again...

    [1] Happily I now have the full version of vs2010, so show all files works again making this less painful to do.



    Tuesday, March 13, 2012 1:56 PM
  • Hi Brett,

    Apologies for getting back to you so late.  Can you tell me what output, if any, is in the VS output window when this issue occurs?  Also, since there still isn't a reliable repro for us to try, would you pass on the event logs while you reproduce the issue?  You can do this by following the steps below:

    1. Open a new command prompt as Administrator.
    1. Run the following command

    logman create trace -n JuneauDebug -p "Microsoft-SQLServerDataTools" 0x800 -o "%LOCALAPPDATA%\SSDTDebug.etl" -ets

    1. Run whatever the target/issue scenario is in SSDT.
    2. Go back to the command prompt and run the following command

    logman stop JuneauDebug -ets

    1. The resulting ETL file will be located at %LOCALAPPDATA\SSDTDebug.etl and can be navigated to using Windows Explorer.
    1. Please attach this file to an email and send it to janety at microsoft dot com

    Again, sorry about the delayed response.  Looking forward to hearing back from you.

    -Janet Yeilding

     

    Tuesday, June 19, 2012 10:29 PM
  • I am currently experiencing this "The script file could not be found" while trying to publish. It occurred once before, and I think the "Reanalyze Project" button finally made it go away,but this time no amount of Clean or Reanalyze seems to fix it. It builds, but won't publish - gets a big red X next to Creating publish preview and Creating database script and just fails with "The script file could not be found".

    So i generated the logman trace and will email it as above if that helps....

    - Stephen

    Tuesday, June 19, 2012 10:56 PM
  • I got the same "Cannot generate deployment plan" error when comparing the schema using SSDT. I'm setting you an email now with the etl file now.

    Friday, June 29, 2012 8:00 AM
  • Thanks Janet, Thanks for the reply.

    Next time I get this I will follow your detailed instructions and send.

    Monday, July 2, 2012 9:12 AM
  • Same issue on TO SQL Azure.

    Worked fine for 4 days then started getting "Cannot generate deployment plan."  

    This occurs on Schema compare and DB Publish.

    Any ideas?

    Thanks

    I do have a etl file gened.

    • Edited by Danmeland Sunday, July 8, 2012 8:48 PM
    Sunday, July 8, 2012 8:41 PM
  • Great!  Could you send the etl file to patrick dot sirr at microsoft.com?  We'll start looking at the traces.
    Monday, July 9, 2012 3:17 AM
  • Is anyone seeing this problem with Visual Studio 2012 RC?  We've added more tracing to SSDT hoping to catch the problem.  Unfortunately we haven't been able to repro in the office and the ETLs we've received haven't had any useful information.
    Monday, July 16, 2012 10:07 PM
  • I haven't had this for some time. It seemed to happen a lot when I was fiddling with tables with lots of stuff on (persisted columns, check constraints using persisted columns, indexes, unique, FKs etc) [1]

    Since I am leaving those tables alone now I haven't had the problem since (a few months) and  I am using SSDT daily for multiple database projects so it is certainly a fairly rare beast.

    Like I mentioned, similar to the other users, either clean and rebuild solved the problem (but not consistently) so what I ended up doing was isolating the table that caused the problem by removing folder by folder until the solution built then adding them all back again. This always seemed to solved the problem, otherwise - doing "something" to the table(s) that were causing the problem cleared it - try adding a dummy column or moving some columns around.

    Very strange and if someone who understands the internals of the software cannot isolate the likely places this would happen, then we definately need more information on this exception.

    Patrick, when you say you've added more trace information - does this include producing a stack trace in the output window for normal users if this exception type occurs in future or other state inforamtion? Perhaps some representation of the package in it's state at that point would also be useful? 

    The big problem that we have here is that - in order to continue doing their work - users will probably inadvertantly change something which may fix/change the state, so I think some clear instructions on what to do if this error occurs (which files to capture etc) would be useful to catching this - and it may be that this change either needs to be made as a hotfix or included in next SP revision (is a Service Pack planned anytime soon?) - or are you saying that these changes have these changes have been included in VS 2012RC? If so, what is the recommended approach here for installing vs2012 with SSDT - is there a blog post I need to take a look at?

    [1] Actually it was the same tables that highlighted the issue with the persisted column tables being re-deployed using sqlpackage that I talked to Adam Mahood about


    Tuesday, July 17, 2012 9:45 AM
  • I've added more ETW events hoping to narrow down the problem.  If this occurs again try unloading the project and deleting the .dbmdl file which sits alongside the .sqlprj.  This removes our backing store database and forces a re-evaluation of all your scripts.  I'll spend some time today creating a compilcated table and see if I can repro.

    Visual Studio 2012 comes with SSDT in the box.  The RC is available here: http://www.microsoft.com/visualstudio/11/en-us.  We'll continue to do web updates for both VS2010 and VS2012.

    • Proposed as answer by Janet Yeilding Wednesday, July 18, 2012 7:28 PM
    Tuesday, July 17, 2012 2:36 PM
  • Patrick, how does the vs2010 SSDT and the vs2012 SSDT relate? Is the core SSDT codebase the same?

    There is some concern that if I move to VS2012 others in the team will be left behind and not be able to open the projects in the 2010 tool.

    Will these extra events be added to the vs2010 SSDT at some point in the future or is vs2012 SSDT going to be the platform for future improvements?

    Thursday, July 19, 2012 9:42 AM
  • Good question.  The codebase for VS 2010 and VS 2012 are *mostly* identical.  As you can image there is some shell-unique code in either platform, but we're using conditionals to verify we maintain a single codebase.  The project types won't need an upgrade process when opening in VS 2012.  You will be able to have a mixed team of VS 2010 users and VS 2012 users.

    Gert Drapers has made it our commitment that we'll stay on whatever platform a majority of our customers are on.  For the forseeable future all web releases will be delivered to VS2010 and VS2012 simultaneously.

    Thursday, July 19, 2012 3:23 PM
  • Removing the .dbmdl file worked for me. Cheers
    Tuesday, July 31, 2012 10:05 PM
  • You can also execute "Project.SSDTReanalyzeProject" at the command window.  This will delete the model and re-build a new one.  The error appears to be in our model, when extended T-SQL verification is toggled on and off the model elements error status do not reset.  We're looking at a fix.
    • Edited by psirr-MSFT Tuesday, August 14, 2012 2:55 PM
    Friday, August 3, 2012 10:49 PM
  • I can confirm that I was getting this error :

    "

    An error occurred during deployment plan generation. Deployment cannot continue.

    The script file could not be found

    "

    AND the solution was to remove the .dbmdl file !

    Thanks for the help :)


    Make the web a beautiful place

    Friday, June 7, 2013 12:14 AM